49 lines
1.3 KiB
Markdown
49 lines
1.3 KiB
Markdown
---
|
|
base_model: unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
|
|
tags:
|
|
- text-generation-inference
|
|
- transformers
|
|
- unsloth
|
|
- llama
|
|
license: apache-2.0
|
|
language:
|
|
- en
|
|
datasets:
|
|
- Sharathhebbar24/Evol-Instruct-Code-80k-v1
|
|
---
|
|
# Saif-1.0-Coder
|
|
|
|
A code-focused assistant fine-tuned from Llama 3.2 3B Instruct.
|
|
|
|
## Model Details
|
|
- **Base model:** unsloth/Llama-3.2-3B-Instruct
|
|
- **Fine-tuned by:** Saif658
|
|
- **Training:** QLoRA 4-bit, 500 steps
|
|
- **Dataset:** Sharathhebbar24/Evol-Instruct-Code-80k-v1
|
|
- **License:** Apache 2.0
|
|
|
|
## What it's good at
|
|
- Writing code in Python, JavaScript, Java, C, C++, C#, TypeScript, PHP, Go, Rust
|
|
- Explaining code and algorithms
|
|
- Debugging and fixing code
|
|
|
|
## Usage
|
|
```python
|
|
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
import torch
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained("Saif658/Saif-1.0-Coder")
|
|
model = AutoModelForCausalLM.from_pretrained(
|
|
"Saif658/Saif-1.0-Coder",
|
|
torch_dtype=torch.float16,
|
|
device_map="auto"
|
|
)
|
|
|
|
messages = [{"role": "user", "content": "Write a binary search in Python"}]
|
|
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
|
|
outputs = model.generate(inputs, max_new_tokens=200)
|
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
```
|
|
|
|
## Limitations
|
|
Small 3B model — may struggle with very complex or long codebases. |