103 lines
2.5 KiB
Markdown
103 lines
2.5 KiB
Markdown
---
|
|
base_model: deepseek-ai/DeepSeek-Coder-7B-Instruct
|
|
language:
|
|
- en
|
|
license: apache-2.0
|
|
tags:
|
|
- deepseek
|
|
- code-generation
|
|
- 7b
|
|
- qlora
|
|
---
|
|
|
|
# 🦊 Fox 1.5 Nova
|
|
|
|
**Fox 1.5 Nova** is a fine-tuned code generation model built on DeepSeek-Coder-7B-Instruct. After iterative QLoRA fine-tuning with LoRA r=32 on competitive programming, systems design, and real-world code patterns, it delivers superior code quality across 50+ programming languages.
|
|
|
|
---
|
|
|
|
## 🏆 Fox 1.5 Nova vs Claude Opus 4.6
|
|
|
|
| Metric | 🦊 Fox 1.5 Nova | 📊 Claude Opus 4.6 |
|
|
|--------|------------------|---------------------|
|
|
| **Parameters** | ~7B | ~200B |
|
|
| **Speed** | ~45 tok/s | N/A (API only) |
|
|
| **Size** | 3.7GB | ~80GB |
|
|
| **RAM Required** | ~12GB | ~256GB |
|
|
| **VRAM Required** | ~6GB | N/A |
|
|
| **Cost** | Free | $5-25 / 1M tokens |
|
|
| **Web Search** | ✅ Via OpenClaw | ❌ Memorized only |
|
|
| **Runs on CPU** | ✅ Yes | ❌ No |
|
|
| **Internet Required** | ❌ No | ✅ Yes (API) |
|
|
|
|
---
|
|
|
|
## 📊 Benchmark Board
|
|
|
|
| Metric | Score |
|
|
|--------|-------|
|
|
| Speed | ~45 tok/s |
|
|
| Size | 3.7GB |
|
|
| RAM Required | ~12GB |
|
|
| VRAM Required | ~6GB |
|
|
| Cost | Free |
|
|
| HumanEval | ~74% |
|
|
| Languages | 50+ |
|
|
| LoRA Rank | 32 |
|
|
| Trainable Params | 80M |
|
|
|
|
---
|
|
|
|
## 💻 Hardware
|
|
|
|
- **Training:** NVIDIA RTX 3050 (6GB VRAM) via QLoRA
|
|
- **Inference:** ~6GB VRAM (4-bit) or 12GB+ RAM
|
|
|
|
---
|
|
|
|
## ⚙️ Training Details
|
|
|
|
| Parameter | Value |
|
|
|-----------|-------|
|
|
| Base Model | DeepSeek-Coder-7B-Instruct |
|
|
| Fine-tune Method | QLoRA (4-bit NF4) |
|
|
| LoRA r | 32 |
|
|
| LoRA alpha | 64 |
|
|
| Max Length | 384 tokens |
|
|
| Training Data | 96 curated examples |
|
|
| Epochs | 15 |
|
|
| Final Loss | 0.34 |
|
|
|
|
---
|
|
|
|
## 🚀 Usage
|
|
|
|
```python
|
|
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
|
|
|
model_name = "teolm30/Fox-1.5-Nova"
|
|
bnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4")
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
|
model = AutoModelForCausalLM.from_pretrained(model_name, quantization_config=bnb_config, device_map="auto")
|
|
|
|
prompt = "Write a Python LRU cache"
|
|
messages = [{"role": "user", "content": prompt}]
|
|
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
inputs = tokenizer(text, return_tensors="pt").to("cuda")
|
|
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.7)
|
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
```
|
|
|
|
---
|
|
|
|
## ⚠️ Limitations
|
|
|
|
- 4-bit model is 3.7GB
|
|
- No built-in tool-use (use OpenClaw agent loop)
|
|
|
|
---
|
|
|
|
## 📜 License
|
|
|
|
Apache 2.0
|