Team Ai
Modelpublic

Tuhin20/CodeLlama-7b-Instruct-FineTuned-JavaPython

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes102downloads
Model Card

๐Ÿง  CodeLlama-7B-Instruct Fine-Tuned on Java + Python

This model is a fine-tuned version of codellama/CodeLlama-7b-Instruct-hf, trained using Unsloth on a curated dataset of 85k Python and Java programming tasks.

โš™๏ธ Technical Details

  • โ€”Framework: Unsloth + TRL SFTTrainer
  • โ€”Quantization: QLoRA (4-bit, merged into Q4KM GGUF)
  • โ€”Context length: 2048 tokens
  • โ€”Base model: CodeLlama-7b-Instruct-hf

๐Ÿงฉ Files

  • โ€”config.json
  • โ€”tokenizer.model
  • โ€”CodeLlama-7b-Instruct-hf.Q4_K_M.gguf

๐Ÿช„ Example Usage

python
from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    "Tuhin20/CodeLlama-7b-Instruct-FineTuned-JavaPython",
    load_in_4bit=True,
    device_map="auto",
)

prompt = "Write a Java function to reverse a linked list."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=300)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Trained and uploaded by Tuhin20