Add model card with results
Browse files
README.md
CHANGED
|
@@ -1,91 +1,61 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 5 |
tags:
|
| 6 |
- sdft
|
| 7 |
- self-distillation
|
| 8 |
-
- continual-learning
|
| 9 |
- tool-use
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
---
|
| 15 |
|
| 16 |
-
# Qwen2.5-7B-Instruct SDFT
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## Training Details
|
| 23 |
|
| 24 |
| Parameter | Value |
|
| 25 |
|-----------|-------|
|
| 26 |
| Base model | Qwen/Qwen2.5-7B-Instruct |
|
| 27 |
-
| Method |
|
| 28 |
-
| Dataset | ToolAlpaca (
|
| 29 |
-
|
|
| 30 |
-
|
|
| 31 |
-
|
|
| 32 |
-
| Epochs | 1 |
|
| 33 |
-
| Precision | bf16 |
|
| 34 |
-
| Max prompt length | 1024 |
|
| 35 |
-
| Max completion length | 1024 |
|
| 36 |
| EMA alpha | 0.01 |
|
| 37 |
-
|
|
| 38 |
-
|
|
| 39 |
-
|
| 40 |
-
## Evaluation Results
|
| 41 |
-
|
| 42 |
-
### Tool-Use Accuracy (ToolAlpaca test set, 68 examples)
|
| 43 |
-
|
| 44 |
-
| Metric | Base Model | This Model (Step 1000) |
|
| 45 |
-
|--------|-----------|--------------------------|
|
| 46 |
-
| Greedy Accuracy | 54.4% | 64.7% |
|
| 47 |
-
| pass@1 | 52.6% | 56.1% |
|
| 48 |
-
| pass@5 | 61.5% | 70.1% |
|
| 49 |
-
| pass@10 | 64.3% | 74.3% |
|
| 50 |
-
|
| 51 |
-
## Usage
|
| 52 |
-
|
| 53 |
-
```python
|
| 54 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 55 |
-
|
| 56 |
-
model = AutoModelForCausalLM.from_pretrained("Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1000")
|
| 57 |
-
tokenizer = AutoTokenizer.from_pretrained("Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1000")
|
| 58 |
-
|
| 59 |
-
messages = [{"role": "user", "content": "Your tool-use prompt here"}]
|
| 60 |
-
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 61 |
-
inputs = tokenizer(text, return_tensors="pt").to(model.device)
|
| 62 |
-
outputs = model.generate(**inputs, max_new_tokens=1024)
|
| 63 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 64 |
-
```
|
| 65 |
|
| 66 |
## All Checkpoints
|
| 67 |
|
| 68 |
-
| Step |
|
| 69 |
-
|------|-----------
|
| 70 |
-
|
|
| 71 |
-
|
|
| 72 |
-
|
|
| 73 |
-
|
|
| 74 |
-
|
|
| 75 |
-
|
|
| 76 |
-
|
|
| 77 |
-
|
|
| 78 |
-
|
|
| 79 |
-
|
|
| 80 |
-
|
|
| 81 |
-
|
| 82 |
-
##
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
title={Self-Distillation Enables Continual Learning},
|
| 87 |
-
author={Shenfeld, Idan and others},
|
| 88 |
-
journal={arXiv preprint arXiv:2601.19897},
|
| 89 |
-
year={2025}
|
| 90 |
-
}
|
| 91 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 4 |
tags:
|
| 5 |
- sdft
|
| 6 |
- self-distillation
|
|
|
|
| 7 |
- tool-use
|
| 8 |
+
- continual-learning
|
| 9 |
+
- sdft-reproduction
|
| 10 |
+
datasets:
|
| 11 |
+
- ToolAlpaca
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Qwen2.5-7B-Instruct — SDFT on Tool Use (Step 1000, Best)
|
| 15 |
+
|
| 16 |
+
Best checkpoint from SDFT (Self-Distillation Fine-Tuning) reproduction of ["Self-Distillation Enables Continual Learning"](https://arxiv.org/abs/2601.19897).
|
| 17 |
|
| 18 |
+
## Results
|
| 19 |
|
| 20 |
+
| Metric | Base | This Model | Paper |
|
| 21 |
+
|--------|------|------------|-------|
|
| 22 |
+
| Greedy Accuracy | 54.4% | **64.7%** | 70.6% |
|
| 23 |
+
| Pass@1 | 52.6% | 56.2% | — |
|
| 24 |
+
| Pass@5 | 61.5% | 70.1% | — |
|
| 25 |
+
| Pass@10 | 64.4% | 74.4% | — |
|
| 26 |
+
| Pass@50 | 70.6% | 79.4% | — |
|
| 27 |
|
| 28 |
## Training Details
|
| 29 |
|
| 30 |
| Parameter | Value |
|
| 31 |
|-----------|-------|
|
| 32 |
| Base model | Qwen/Qwen2.5-7B-Instruct |
|
| 33 |
+
| Method | On-policy Self-Distillation (SDFT) |
|
| 34 |
+
| Dataset | ToolAlpaca (4046 train, 68 test) |
|
| 35 |
+
| Learning rate | 1e-5 |
|
| 36 |
+
| Batch size | 32 |
|
| 37 |
+
| Epochs | 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
| EMA alpha | 0.01 |
|
| 39 |
+
| Step | 1000 (best of 1011) |
|
| 40 |
+
| Hardware | L40S 48GB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## All Checkpoints
|
| 43 |
|
| 44 |
+
| Step | Greedy Acc |
|
| 45 |
+
|------|-----------|
|
| 46 |
+
| [100](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-100) | 55.9% |
|
| 47 |
+
| [200](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-200) | 48.5% |
|
| 48 |
+
| [300](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-300) | 44.1% |
|
| 49 |
+
| [400](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-400) | 47.1% |
|
| 50 |
+
| [500](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-500) | 57.4% |
|
| 51 |
+
| [600](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-600) | 47.1% |
|
| 52 |
+
| [700](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-700) | 54.4% |
|
| 53 |
+
| [800](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-800) | 52.9% |
|
| 54 |
+
| [900](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-900) | 57.4% |
|
| 55 |
+
| **[1000](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1000)** | **64.7%** |
|
| 56 |
+
| [1011](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1011) | 57.4% |
|
| 57 |
+
|
| 58 |
+
## Related
|
| 59 |
+
|
| 60 |
+
- **Eval results:** [Ayushnangia/sdft-reproduction-eval-results](https://huggingface.co/datasets/Ayushnangia/sdft-reproduction-eval-results)
|
| 61 |
+
- **Code:** [github.com/ayushnangia/Self-Distillation](https://github.com/ayushnangia/Self-Distillation)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|