lewtun HF Staff commited on
Commit
8bc11bd
·
verified ·
1 Parent(s): 4045ceb

Training in progress, step 500

Browse files
README.md CHANGED
@@ -1,26 +1,60 @@
1
  ---
 
 
 
2
  tags:
3
- - ml-intern
 
 
 
 
 
4
  ---
5
 
6
- # lewtun/SmolLM2-360M-OpenMathReasoning
7
 
8
- <!-- ml-intern-provenance -->
9
- ## Generated by ML Intern
10
 
11
- This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.
12
-
13
- - Try ML Intern: https://smolagents-ml-intern.hf.space
14
- - Source code: https://github.com/huggingface/ml-intern
15
-
16
- ## Usage
17
 
18
  ```python
19
- from transformers import AutoModelForCausalLM, AutoTokenizer
20
 
21
- model_id = 'lewtun/SmolLM2-360M-OpenMathReasoning'
22
- tokenizer = AutoTokenizer.from_pretrained(model_id)
23
- model = AutoModelForCausalLM.from_pretrained(model_id)
 
24
  ```
25
 
26
- For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: HuggingFaceTB/SmolLM2-360M-Instruct
3
+ library_name: transformers
4
+ model_name: SmolLM2-360M-OpenMathReasoning
5
  tags:
6
+ - generated_from_trainer
7
+ - sft
8
+ - hf_jobs
9
+ - trackio:https://lewtun-mlintern-omr360m1.hf.space?project=huggingface&runs=smollm2-360m-openmath-cot-lr2e5-bs16&sidebar=collapsed
10
+ - trl
11
+ licence: license
12
  ---
13
 
14
+ # Model Card for SmolLM2-360M-OpenMathReasoning
15
 
16
+ This model is a fine-tuned version of [HuggingFaceTB/SmolLM2-360M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct).
17
+ It has been trained using [TRL](https://github.com/huggingface/trl).
18
 
19
+ ## Quick start
 
 
 
 
 
20
 
21
  ```python
22
+ from transformers import pipeline
23
 
24
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
25
+ generator = pipeline("text-generation", model="lewtun/SmolLM2-360M-OpenMathReasoning", device="cuda")
26
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
27
+ print(output["generated_text"])
28
  ```
29
 
30
+ ## Training procedure
31
+
32
+
33
+ [<img src="https://raw.githubusercontent.com/gradio-app/trackio/refs/heads/main/trackio/assets/badge.png" alt="Visualize in Trackio" title="Visualize in Trackio" width="150" height="24"/>](https://lewtun-mlintern-omr360m1.hf.space?project=huggingface&runs=smollm2-360m-openmath-cot-lr2e5-bs16&sidebar=collapsed)
34
+
35
+
36
+ This model was trained with SFT.
37
+
38
+ ### Framework versions
39
+
40
+ - TRL: 1.4.0
41
+ - Transformers: 5.8.0
42
+ - Pytorch: 2.11.0
43
+ - Datasets: 4.8.5
44
+ - Tokenizers: 0.22.2
45
+
46
+ ## Citations
47
+
48
+
49
+
50
+ Cite TRL as:
51
+
52
+ ```bibtex
53
+ @software{vonwerra2020trl,
54
+ title = {{TRL: Transformers Reinforcement Learning}},
55
+ author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
56
+ license = {Apache-2.0},
57
+ url = {https://github.com/huggingface/trl},
58
+ year = {2020}
59
+ }
60
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
2
+ You are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>
3
+ ' }}{% endif %}{{'<|im_start|>' + message['role'] + '
4
+ ' + message['content'] + '<|im_end|>' + '
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
6
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 2,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 960,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 2560,
15
+ "is_llama_config": true,
16
+ "max_position_embeddings": 8192,
17
+ "mlp_bias": false,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 15,
20
+ "num_hidden_layers": 32,
21
+ "num_key_value_heads": 5,
22
+ "pad_token_id": 2,
23
+ "pretraining_tp": 1,
24
+ "rms_norm_eps": 1e-05,
25
+ "rope_interleaved": false,
26
+ "rope_parameters": {
27
+ "rope_theta": 100000,
28
+ "rope_type": "default"
29
+ },
30
+ "tie_word_embeddings": true,
31
+ "transformers.js_config": {
32
+ "kv_cache_dtype": {
33
+ "fp16": "float16",
34
+ "q4f16": "float16"
35
+ }
36
+ },
37
+ "transformers_version": "5.8.0",
38
+ "use_cache": false,
39
+ "vocab_size": 49152
40
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": [
5
+ 2
6
+ ],
7
+ "pad_token_id": 2,
8
+ "transformers_version": "5.8.0"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82d2fe61d64fdca0334c0b8eb4645c9e68a2b0e28b1bed3eef7032c91846068d
3
+ size 723674912
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|im_start|>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>"
11
+ ],
12
+ "is_local": false,
13
+ "local_files_only": false,
14
+ "model_max_length": 8192,
15
+ "pad_token": "<|im_end|>",
16
+ "tokenizer_class": "GPT2Tokenizer",
17
+ "unk_token": "<|endoftext|>",
18
+ "vocab_size": 49152
19
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d9eff9abe4f0515194c4c9bff4e7bddb18cad113c2bca46ffde9ac33914e38c
3
+ size 5841