Spestly commited on
Commit
0504796
·
verified ·
1 Parent(s): fdd3371

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +145 -0
README.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model:
4
+ - Qwen/Qwen2.5-7B-Instruct
5
+ library_name: transformers
6
+ language:
7
+ - en
8
+ - zh
9
+ - fr
10
+ - es
11
+ - pt
12
+ - de
13
+ - it
14
+ - ru
15
+ - ja
16
+ - ko
17
+ - vi
18
+ - th
19
+ - ar
20
+ - fa
21
+ - he
22
+ - tr
23
+ - cs
24
+ - pl
25
+ - hi
26
+ - bn
27
+ - ur
28
+ - id
29
+ - ms
30
+ - lo
31
+ - my
32
+ - ceb
33
+ - km
34
+ - tl
35
+ - nl
36
+ tags:
37
+ - trl
38
+ - Reasoning
39
+ - open-llm
40
+ - synthetic-data
41
+ - Deepseek-R1
42
+ - Qwen2.5
43
+ - fine-tune
44
+ - unsloth
45
+ - Conversational
46
+ - Agentic
47
+ ---
48
+ # **Kyro-n1: A powerful family of models made for reasoning**
49
+ > [!IMPORTANT]
50
+ > This model uses some features from **AIDC-AI/Marco-o1** tokenizer and this model is a Qwen2.5-7B fine-tune.
51
+
52
+ Kyro-n1 is a lightweight and fast reasoning model based on **Qwen/Qwen2.5-7B-Instruct**. We have further increased the quality of reasoning in certain aspects such as maths and science, but in this version, our main goal was maths and reasoning in general conversations. We intend to expand on this in future models. The whole purpose of Kyro is so that almost every device can run a reasoning model no matter their compute. This is why we are releasing 3B, 7B and 14B variants to achieve this goal.
53
+
54
+ ## **Model Details**
55
+ - Developed by: [Spestly (Open-Neo)](https://x.com/Spestly) & [Kazex (Open-Neo)](https://x.com/32GIGABYTES_YT)
56
+ - Type: Causal Language Models
57
+ - Training Stage: Pretraining & Post-training
58
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
59
+ - Number of Parameters: 7.61B
60
+ - Number of Paramaters (Non-Embedding): 6.53B
61
+ - Number of Layers: 28
62
+ - Number of Attention Heads (GQA): 28 for Q and 4 for KV
63
+ - Context Length: Full 131,072 tokens and generation 8192 tokens
64
+
65
+ ## **Model Downloads**
66
+
67
+ ### Kyro-n1 Models
68
+
69
+ <div align="center">
70
+
71
+ | | **Training Data** | **Params** | **Input modalities** | **Output modalities** | **Context length** | **Download Link** |
72
+ |--------------|------------------------------------|---------|------------------|----------------------|----------------|----------------|
73
+ | **Kyro (text only)** | A new mix of publicly available online data. | **3B** | Multilingual Text | Multilingual Text and code | 128k | [🤗 HuggingFace](https://huggingface.co/open-neo/Kyro-n1-3B) |
74
+ | | | **7B** | Multilingual Text | Multilingual Text and code | 128k | [🤗 HuggingFace](https://huggingface.co/open-neo/Kyro-n1-7B) |
75
+ | | | **14B** | Multilingual Text | Multilingual Text and code | 128k | [🤗 HuggingFace](https://huggingface.co/open-neo/Kyro-n1-14B) |
76
+
77
+ </div>
78
+
79
+ ### Kyro-1 Models
80
+
81
+ ## **Usage**
82
+
83
+ The code of Kyro-n1 (Qwen2.5) has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
84
+
85
+ With `transformers<4.37.0`, you will encounter the following error:
86
+ ```
87
+ KeyError: 'qwen2'
88
+ ```
89
+
90
+ ### **Quickstart**
91
+
92
+ ```python
93
+ from transformers import AutoModelForCausalLM, AutoTokenizer
94
+ model_name = "open-neo/Kyro-n1-7B"
95
+ model = AutoModelForCausalLM.from_pretrained(
96
+ model_name,
97
+ torch_dtype="auto",
98
+ device_map="auto"
99
+ )
100
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
101
+ prompt = "What do you think about CRISPR and its effect on the future of humanity?"
102
+ messages = [
103
+ {"role": "user", "content": prompt}
104
+ ]
105
+ text = tokenizer.apply_chat_template(
106
+ messages,
107
+ tokenize=False,
108
+ add_generation_prompt=True
109
+ )
110
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
111
+ generated_ids = model.generate(
112
+ **model_inputs,
113
+ max_new_tokens=2048
114
+ )
115
+ generated_ids = [
116
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
117
+ ]
118
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
119
+ ```
120
+
121
+ ## Citation
122
+
123
+ If you find our work helpful, feel free to give us a cite.
124
+
125
+ ```
126
+ @misc{qwen2.5,
127
+ title = {Qwen2.5: A Party of Foundation Models},
128
+ url = {https://qwenlm.github.io/blog/qwen2.5/},
129
+ author = {Qwen Team},
130
+ month = {September},
131
+ year = {2024}
132
+ }
133
+ @article{qwen2,
134
+ title={Qwen2 Technical Report},
135
+ author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
136
+ journal={arXiv preprint arXiv:2407.10671},
137
+ year={2024}
138
+ }
139
+ @misc{kyro-n1,
140
+ title={Kyro-n1: A powerful family of models made for reasoning},
141
+ author={Aayan Mishra and Krish Thumar},
142
+ howpublished={https://huggingface.co/collections/open-neo/kyro-n1-67ab2e7bbc76a9aab3030c21},
143
+ year={2025}
144
+ }
145
+ ```