Ayushnangia commited on
Commit
6cc23c2
·
verified ·
1 Parent(s): 6bcc256

Add model card with results

Browse files
Files changed (1) hide show
  1. README.md +40 -70
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
- - qwen2.5
11
- language:
12
- - en
13
- pipeline_tag: text-generation
14
  ---
15
 
16
- # Qwen2.5-7B-Instruct SDFT Tool Use (Step 1000)
 
 
17
 
18
- This model is a **Self-Distillation Fine-Tuned (SDFT)** version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct), trained on the ToolAlpaca tool-use dataset.
19
 
20
- SDFT is an on-policy learning method from ["Self-Distillation Enables Continual Learning"](https://arxiv.org/abs/2601.19897) that acquires new skills while preserving prior capabilities, significantly reducing catastrophic forgetting compared to standard SFT.
 
 
 
 
 
 
21
 
22
  ## Training Details
23
 
24
  | Parameter | Value |
25
  |-----------|-------|
26
  | Base model | Qwen/Qwen2.5-7B-Instruct |
27
- | Method | SDFT (On-Policy Self-Distillation) |
28
- | Dataset | ToolAlpaca (4,046 training examples) |
29
- | Training step | 1000 / 1011 |
30
- | Learning rate | 2e-5 (cosine schedule, 10% warmup) |
31
- | Batch size | 32 (gradient accumulation) |
32
- | Epochs | 1 |
33
- | Precision | bf16 |
34
- | Max prompt length | 1024 |
35
- | Max completion length | 1024 |
36
  | EMA alpha | 0.01 |
37
- | Hardware | 1x NVIDIA L40S 48GB |
38
- | Training time | ~42 hours (full run) |
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 | HuggingFace |
69
- |------|-------------|
70
- | 100 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-100](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-100) |
71
- | 200 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-200](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-200) |
72
- | 300 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-300](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-300) |
73
- | 400 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-400](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-400) |
74
- | 500 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-500](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-500) |
75
- | 600 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-600](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-600) |
76
- | 700 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-700](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-700) |
77
- | 800 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-800](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-800) |
78
- | 900 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-900](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-900) |
79
- | 1000 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1000](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1000) |
80
- | 1011 | [Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1011](https://huggingface.co/Ayushnangia/qwen2.5-7b-instruct-sdft-tooluse-step-1011) |
81
-
82
- ## Citation
83
-
84
- ```bibtex
85
- @article{shenfeld2025selfdistillation,
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)