mkshing commited on
Commit
75d840a
Β·
verified Β·
1 Parent(s): ccbe84b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -3
README.md CHANGED
@@ -1,3 +1,87 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - ja
5
+ pipeline_tag: text-generation
6
+ library_name: transformers
7
+ ---
8
+ # Smol-Swallow-1.5B
9
+
10
+ πŸ€— [Models](https://huggingface.co/SakanaAI) | πŸ“š [Paper](https://arxiv.org/abs/TODO) | πŸ“ [Blog](https://sakana.ai/taid/) | 🐦 [Twitter](https://twitter.com/SakanaAILabs)
11
+
12
+ **Smol-Swallow-1.5B** is a Japanese compact language model, using our new knowledge distillation method called TAID.
13
+ We used [Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) as the teacher model and
14
+ [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) as the student model.
15
+
16
+ ## Usage
17
+
18
+ Use the code below to get started with the model.
19
+
20
+ <details>
21
+ <summary> Click to expand </summary>
22
+
23
+ ```python
24
+ import torch
25
+ from transformers import AutoModelForCausalLM, AutoTokenizer
26
+
27
+
28
+ # 1. load model
29
+ device = "cuda" if torch.cuda.is_available() else "CPU"
30
+ repo_id = "SakanaAI/Smol-Swallow-1.5B"
31
+ model = AutoModelForCausalLM.from_pretrained(repo_id, torch_dtype="auto")
32
+ tokenizer = AutoTokenizer.from_pretrained(repo_id)
33
+ model.to(device)
34
+
35
+ # 2. prepare inputs
36
+ text = "拝啓\n"
37
+ inputs = tokenizer(text, return_tensors="pt")
38
+
39
+ # 3. generate
40
+ output_ids = model.generate(**inputs.to(device))
41
+ output_ids = output_ids[:, inputs.input_ids.shape[1] :]
42
+ generated_text = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0]
43
+ print(generated_text)
44
+ ```
45
+
46
+ </details>
47
+
48
+
49
+ ## Model Details
50
+
51
+ <!-- Provide a longer summary of what this model is. -->
52
+
53
+ - **Developed by:** [Sakana AI](https://sakana.ai/) and [Swallow Team](https://swallow-llm.github.io/index.en.html)
54
+ - **Model type:** Autoregressive Language Model
55
+ - **Language(s):** Japanese
56
+ - **License:** [Apache License, Version 2.0](./LICENSE)
57
+ - **Repository:** [SakanaAI/TAID](https://github.com/SakanaAI/TAID)
58
+ - **Paper:** https://arxiv.org/abs/TODO
59
+ - **Blog:** https://sakana.ai/taid
60
+
61
+ <!-- ## Model Performance -->
62
+
63
+
64
+ ## Uses
65
+ This model is provided for research and development purposes only and should be considered as an experimental prototype.
66
+ It is not intended for commercial use or deployment in mission-critical environments.
67
+ Use of this model is at the user's own risk, and its performance and outcomes are not guaranteed.
68
+ Sakana AI shall not be liable for any direct, indirect, special, incidental, or consequential damages, or any loss arising from the use of this model, regardless of the results obtained.
69
+ Users must fully understand the risks associated with the use of this model and use it at their own discretion.
70
+
71
+
72
+ ## Acknowledgement
73
+
74
+ We would like to thank the developers of the source models for their contributions and for making their work available.
75
+
76
+ ## Citation
77
+
78
+ ```bibtex
79
+ @misc{sakana2025taid,
80
+ title = {TAID: Temporally Adaptive Interpolated Distillation for Efficient Knowledge Transfer in Language Models},
81
+ author. = {Makoto Shing and Ko Misaki and Han Bao and Sho Yokoi and Takuya Akiba},
82
+ year = {2025},
83
+ eprint = {TODO},
84
+ archivePrefix = {arXiv},
85
+ primaryClass = {cs.NE}
86
+ }
87
+ ```