ArcOffical commited on
Commit
a917d5c
·
verified ·
1 Parent(s): 7b7b1fb

Upload 7 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PiCo 1B
2
+
3
+ > A 1B-parameter dense language model optimized for reasoning and knowledge tasks.
4
+
5
+ ---
6
+
7
+ ## 📌 Model Overview
8
+
9
+ **PiCo 1B** is a compact, high-performance language model with ~1.46 billion parameters. Despite its small size, it achieves competitive performance across reasoning, knowledge, and coding benchmarks, particularly excelling in science reasoning tasks.
10
+
11
+ ---
12
+
13
+ ## 📋 Model Details
14
+
15
+ | Attribute | Value |
16
+ |-----------|-------|
17
+ | **Model Size** | ~1.46B parameters |
18
+ | **Architecture** | Dense transformer (decoder-only) |
19
+ | **Context Length** | 2048 tokens |
20
+ | **Training Data** | Wikitext + curated corpora |
21
+ | **Precision** | FP32 / FP16 / Safetensors |
22
+ | **License** | Open-source |
23
+
24
+ ---
25
+
26
+ ## 📊 Benchmark Results
27
+
28
+ PiCo 1B is evaluated against **31 open-source models** in the 1B–2B parameter range across 7 standard benchmarks.
29
+
30
+ ### MMLU (Massive Multitask Language Understanding)
31
+
32
+ Measures general knowledge across 57 subjects including STEM, humanities, and social sciences.
33
+
34
+ ![MMLU Benchmark](https://aka.doubaocdn.com/s/AGt01wd7E8)
35
+
36
+ **PiCo 1B Score: 53.93%** — Rank: Top 3 among 1B–2B models
37
+
38
+ ---
39
+
40
+ ### GSM8K (Grade School Math)
41
+
42
+ Measures mathematical reasoning with grade-school level word problems.
43
+
44
+ ![GSM8K Benchmark](https://aka.doubaocdn.com/s/7as81wd7E8)
45
+
46
+ **PiCo 1B Score: 29.33%** — Rank: Top 10 among 1B–2B models
47
+
48
+ ---
49
+
50
+ ### ARC-Challenge (AI2 Reasoning Challenge)
51
+
52
+ Measures science reasoning with grade-level science questions (harder subset).
53
+
54
+ ![ARC-Challenge Benchmark](https://aka.doubaocdn.com/s/PAwz1wd7E8)
55
+
56
+ **PiCo 1B Score: 69.2%** — 🥇 **Rank #1** among 1B–2B models
57
+
58
+ ---
59
+
60
+ ### ARC-Easy (AI2 Reasoning Challenge)
61
+
62
+ Measures basic science reasoning with grade-level science questions (easier subset).
63
+
64
+ ![ARC-Easy Benchmark](https://aka.doubaocdn.com/s/qprH1wd7E8)
65
+
66
+ **PiCo 1B Score: 85.56%** — 🥇 **Rank #1** among 1B–2B models
67
+
68
+ ---
69
+
70
+ ### HellaSwag (Commonsense Reasoning)
71
+
72
+ Measures commonsense natural language inference with everyday scenarios.
73
+
74
+ ![HellaSwag Benchmark](https://aka.doubaocdn.com/s/TnLS1wd7E8)
75
+
76
+ **PiCo 1B Score: 49.4%** — An area for improvement
77
+
78
+ ---
79
+
80
+ ### HumanEval (Code Generation)
81
+
82
+ Measures functional correctness of code generation across 164 programming problems.
83
+
84
+ ![HumanEval Benchmark](https://aka.doubaocdn.com/s/NaZ91wd7E8)
85
+
86
+ **PiCo 1B Score: 39.63%** — Rank: Top 4 among 1B–2B models
87
+
88
+ ---
89
+
90
+ ### TruthfulQA (Truthfulness)
91
+
92
+ Measures whether the model generates truthful answers rather than mimicking common misconceptions.
93
+
94
+ ![TruthfulQA Benchmark](https://aka.doubaocdn.com/s/s3lo1wd7E8)
95
+
96
+ **PiCo 1B Score: 39.3%** — Rank: Top 5 among 1B–2B models
97
+
98
+ ---
99
+
100
+ ## 🏆 Performance Highlights
101
+
102
+ ### ✅ Strengths
103
+
104
+ - **Science Reasoning**: Best-in-class performance on ARC-Easy and ARC-Challenge
105
+ - **General Knowledge**: Top 3 on MMLU, outperforming many larger 1.5B–2B models
106
+ - **Coding Ability**: Strong HumanEval performance, competitive with models 2x its size
107
+ - **Truthfulness**: Top 5 on TruthfulQA, demonstrating reliable factual output
108
+
109
+ ### 📈 Areas for Improvement
110
+
111
+ - **Commonsense Reasoning**: HellaSwag score lags behind modern 1.5B+ models
112
+ - **Mathematical Reasoning**: GSM8K performance is solid but not top-tier
113
+ - **Scale**: Further training on larger, more diverse datasets could boost all benchmarks
114
+
115
+ ---
116
+
117
+ ## 🚀 Usage
118
+
119
+ ### Quick Start
120
+
121
+ ```python
122
+ from transformers import AutoModelForCausalLM, AutoTokenizer
123
+
124
+ model_name = "pico-1b"
125
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
126
+ model = AutoModelForCausalLM.from_pretrained(model_name)
127
+
128
+ prompt = "Explain the theory of relativity in simple terms."
129
+ inputs = tokenizer(prompt, return_tensors="pt")
130
+ outputs = model.generate(**inputs, max_length=200)
131
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
132
+ ```
133
+
134
+ ### Model Formats
135
+
136
+ - **Safetensors** (recommended): Secure and fast loading
137
+ - **PyTorch (FP16)**: Standard format
138
+ - **GGUF**: For local inference with llama.cpp
139
+
140
+ ---
141
+
142
+ ## 🏋️ Training Details
143
+
144
+ | Aspect | Description |
145
+ |--------|-------------|
146
+ | **Architecture** | Dense decoder-only transformer |
147
+ | **Training Data** | Wikitext + curated multi-domain corpora |
148
+ | **Optimizer** | AdamW |
149
+ | **Learning Rate** | Cosine schedule with warmup |
150
+ | **Batch Size** | Configurable per GPU setup |
151
+ | **Training Framework** | PyTorch + Hugging Face Transformers |
152
+
153
+ ---
154
+
155
+ ## ⚠️ Limitations
156
+
157
+ - **Small Model Size**: As a 1B-parameter model, it has inherent limitations compared to larger models (7B+) on complex reasoning tasks
158
+ - **Training Data**: Primarily trained on English text; performance on non-English languages may be limited
159
+ - **Hallucinations**: Like all LLMs, it may generate factually incorrect information
160
+ - **Context Window**: Limited to 2048 tokens by default
161
+
162
+ ---
163
+
164
+ ## 📝 Citation
165
+
166
+ If you use PiCo 1B in your research or projects, please cite:
167
+
168
+ ```bibtex
169
+ @misc{pico1b,
170
+ title={PiCo 1B: A Compact Language Model Optimized for Reasoning},
171
+ author={PiCo Team},
172
+ year={2026},
173
+ howpublished={\url{https://github.com/pico-llm/pico-1b}},
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ## 📄 License
180
+
181
+ This model is released under an open-source license. Please see the LICENSE file for details.
182
+
183
+ ---
184
+
185
+ *Last updated: June 2026*
chat_template.jinja ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
38
+ {%- endfor %}
39
+ {{- '<|im_end|>\n' }}
40
+ {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
+ {{- '<|im_start|>user' }}
43
+ {%- endif %}
44
+ {{- '\n<tool_response>\n' }}
45
+ {{- message.content }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "dtype": "bfloat16",
8
+ "eos_token_id": 151643,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 1536,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 8960,
13
+ "layer_types": [
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention"
42
+ ],
43
+ "max_position_embeddings": 131072,
44
+ "max_window_layers": 28,
45
+ "model_type": "qwen2",
46
+ "num_attention_heads": 12,
47
+ "num_hidden_layers": 28,
48
+ "num_key_value_heads": 2,
49
+ "pad_token_id": null,
50
+ "rms_norm_eps": 1e-06,
51
+ "rope_parameters": {
52
+ "rope_theta": 1000000.0,
53
+ "rope_type": "default"
54
+ },
55
+ "sliding_window": null,
56
+ "tie_word_embeddings": true,
57
+ "transformers_version": "5.12.1",
58
+ "use_cache": true,
59
+ "use_mrope": false,
60
+ "use_sliding_window": false,
61
+ "vocab_size": 151936
62
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": false,
4
+ "eos_token_id": 151643,
5
+ "max_new_tokens": 2048,
6
+ "transformers_version": "5.12.1"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcf18ee39c3575a4c8df94713dbde01a8ee5bc5a0404d254944f66c6d90a1b33
3
+ size 3087467144
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
3
+ size 11421892
tokenizer_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|endoftext|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "local_files_only": false,
25
+ "model_max_length": 131072,
26
+ "pad_token": "<|endoftext|>",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null
30
+ }