louhless commited on
Commit
0134237
·
verified ·
1 Parent(s): 8129617

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +164 -45
README.md CHANGED
@@ -1,4 +1,3 @@
1
- ---
2
  language:
3
  - en
4
  tags:
@@ -12,6 +11,8 @@ tags:
12
  - javascript
13
  - sql
14
  - bash
 
 
15
  - experimental
16
  license: apache-2.0
17
  base_model: HuggingFaceTB/SmolLM2-135M-Instruct
@@ -22,62 +23,85 @@ model_creator: louhless
22
 
23
  # Ycoder-small
24
 
25
- `Ycoder-small` is a tiny experimental code-focused language model created by **louhless** and fine-tuned for short programming prompts, lightweight problem solving, and simple chat behavior.
26
 
27
  Join Discord: https://discord.gg/Dq4MWuJm
28
 
29
- Its main focus is:
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  - Python
32
  - GLSL
33
  - JavaScript
34
  - SQL
35
  - Bash
 
 
36
 
37
- It also has limited support for simple math prompts and short normal conversation.
38
 
39
- ## Model Details
40
 
41
- - **Model name:** `Ycoder-small`
42
- - **Creator:** `louhless`
43
- - **Base model:** `HuggingFaceTB/SmolLM2-135M-Instruct`
44
- - **Model type:** fine-tuned causal language model
45
- - **Architecture:** Llama-style instruct model
46
- - **Language:** English, with small German greeting support
47
- - **Context length:** 8192
48
- - **Current export:** GGUF available
49
- - **Status:** experimental
50
 
51
- ## Important Note
 
 
 
 
 
 
 
52
 
53
- `Ycoder-small` is **not trained from scratch**.
54
 
55
- It is a fine-tuned version of `HuggingFaceTB/SmolLM2-135M-Instruct`, adapted on a small custom instruction dataset focused mainly on short code tasks, simple math, normal replies, and optional thinking-style output.
56
 
57
- It is intended as a compact coding experiment and local demo model, not as a production-grade coding assistant.
 
 
 
58
 
59
- ## Training Goal
60
 
61
- The goal of this project is to explore how small a fine-tuned model can be while still producing somewhat useful short outputs in a narrow setup.
62
 
63
- The project is optimized for:
64
 
65
- - local experimentation on a Mac
66
- - fast fine-tuning
67
- - tiny datasets
68
- - compact GGUF export workflows
69
- - short code/math/chat responses
70
- - optional thinking-style output
 
 
 
 
 
 
71
 
72
  ## Training Data
73
 
74
- The model was fine-tuned on a small custom instruction dataset with three categories:
75
 
76
  - `router_text`
77
  - `code`
78
  - `math`
79
 
80
- The code portion was emphasized and includes examples such as:
81
 
82
  - Python utility functions
83
  - Python syntax fixes
@@ -88,32 +112,127 @@ The code portion was emphasized and includes examples such as:
88
  - GLSL vertex shaders
89
  - short code explanations
90
 
91
- The text and math portions include examples such as:
92
 
93
- - greetings like `hello`, `hi`, and `hallo`
94
  - short normal assistant replies
95
  - simple arithmetic
96
  - simple equations such as `3x = 21`
97
 
98
- Because the dataset is very small, the model is strongly biased toward short prompt patterns and limited example styles.
99
 
100
- ## Training Setup
101
 
102
- Training approach:
103
 
104
- - supervised fine-tuning
105
- - causal language modeling objective
106
- - small instruction-style Q&A dataset
107
- - local Mac training workflow
108
- - continued fine-tuning from an instruct base model
109
 
110
- Observed local training characteristics vary by run and base model. The current stronger version uses `SmolLM2-135M-Instruct`, so it is slower than the earlier `distilgpt2` experiment but has much better chat/context behavior.
111
 
112
- ## Thinking Toggle
 
 
113
 
114
- `Ycoder-small` supports a Qwen-style thinking toggle in the local chat script.
115
 
116
- Thinking off:
117
 
118
- ```bash
119
- python3 scripts/chat_hf_model.py --prompt "write python code to reverse a string" --thinking off
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  language:
2
  - en
3
  tags:
 
11
  - javascript
12
  - sql
13
  - bash
14
+ - reasoning
15
+ - vision
16
  - experimental
17
  license: apache-2.0
18
  base_model: HuggingFaceTB/SmolLM2-135M-Instruct
 
23
 
24
  # Ycoder-small
25
 
26
+ `Ycoder-small` is a tiny experimental code-focused language model created by **louhless** and fine-tuned for short programming prompts, lightweight problem solving, simple chat, and optional thinking-style output.
27
 
28
  Join Discord: https://discord.gg/Dq4MWuJm
29
 
30
+ ## Model Details
31
+
32
+ - **Model name:** `Ycoder-small`
33
+ - **Creator:** `louhless`
34
+ - **Base model:** `HuggingFaceTB/SmolLM2-135M-Instruct`
35
+ - **Architecture:** Llama-style causal language model
36
+ - **Context length:** 8192
37
+ - **Language:** English, with small German greeting support
38
+ - **Export:** GGUF available
39
+ - **Status:** experimental
40
+
41
+ ## Focus
42
+
43
+ The model is mainly tuned for:
44
 
45
  - Python
46
  - GLSL
47
  - JavaScript
48
  - SQL
49
  - Bash
50
+ - simple math
51
+ - short normal assistant replies
52
 
53
+ ## LM Studio Thinking Toggle
54
 
55
+ The GGUF metadata includes a chat template with an `enable_thinking` variable.
56
 
57
+ When `enable_thinking` is enabled, the model is prompted to use:
 
 
 
 
 
 
 
 
58
 
59
+ ```text
60
+ <think>
61
+ short reasoning summary
62
+ </think>
63
+ <answer>
64
+ final answer
65
+ </answer>
66
+ ```
67
 
68
+ When `enable_thinking` is disabled, the model is prompted to return only the final answer and avoid `<think>` tags.
69
 
70
+ For LM Studio reasoning parsing, use:
71
 
72
+ ```text
73
+ Start tag: <think>
74
+ End tag: </think>
75
+ ```
76
 
77
+ Note: the thinking output is a trained/prompted reasoning format. It is not guaranteed to be correct, complete, or private chain-of-thought.
78
 
79
+ ## Vision Companion
80
 
81
+ This project includes an optional free/open-source vision companion model:
82
 
83
+ - **Vision model:** `google/vit-base-patch16-224`
84
+ - **Task:** image classification
85
+ - **License:** Apache-2.0
86
+ - **Approximate size:** about 86M parameters
87
+
88
+ The vision model is separate from the GGUF language model. It can classify an image first, then the predicted labels can be passed into `Ycoder-small` as text context.
89
+
90
+ Example:
91
+
92
+ ```bash
93
+ python3 scripts/vision_classify.py path/to/image.png
94
+ ```
95
 
96
  ## Training Data
97
 
98
+ `Ycoder-small` was fine-tuned on a small custom instruction dataset with three main categories:
99
 
100
  - `router_text`
101
  - `code`
102
  - `math`
103
 
104
+ The code examples include:
105
 
106
  - Python utility functions
107
  - Python syntax fixes
 
112
  - GLSL vertex shaders
113
  - short code explanations
114
 
115
+ The text and math examples include:
116
 
117
+ - greetings such as `hello`, `hi`, and `hallo`
118
  - short normal assistant replies
119
  - simple arithmetic
120
  - simple equations such as `3x = 21`
121
 
122
+ ## Examples
123
 
124
+ ### Normal Reply
125
 
126
+ Prompt:
127
 
128
+ ```text
129
+ hallo
130
+ ```
 
 
131
 
132
+ Output:
133
 
134
+ ```text
135
+ Hallo! Wie kann ich helfen?
136
+ ```
137
 
138
+ ### Python
139
 
140
+ Prompt:
141
 
142
+ ```text
143
+ write python code to reverse a string
144
+ ```
145
+
146
+ Output:
147
+
148
+ ```python
149
+ def reverse_string(text):
150
+ return text[::-1]
151
+ ```
152
+
153
+ ### Math
154
+
155
+ Prompt:
156
+
157
+ ```text
158
+ Solve 3x = 21.
159
+ ```
160
+
161
+ Output:
162
+
163
+ ```text
164
+ x = 7
165
+ ```
166
+
167
+ ### Thinking On
168
+
169
+ Prompt:
170
+
171
+ ```text
172
+ write python code to reverse a string
173
+ ```
174
+
175
+ Output:
176
+
177
+ ```text
178
+ <think>
179
+ Use slicing to reverse the string.
180
+ </think>
181
+ <answer>
182
+ def reverse_string(text):
183
+ return text[::-1]
184
+ </answer>
185
+ ```
186
+
187
+ ## GGUF Export
188
+
189
+ The current GGUF export is:
190
+
191
+ ```text
192
+ Ycoder-small-f16.gguf
193
+ ```
194
+
195
+ Current local export details:
196
+
197
+ ```text
198
+ Architecture: llama
199
+ Context length: 8192
200
+ Approximate size: 258 MB
201
+ SHA-256: 4214df58e0907b0a379029180c60154942004c594c29e53fedef22c0dae866b2
202
+ ```
203
+
204
+ ## Intended Use
205
+
206
+ Good use cases:
207
+
208
+ - tiny coding-model experiments
209
+ - local fine-tuning demos
210
+ - educational small-LLM projects
211
+ - GGUF conversion workflows
212
+ - narrow code prompt testing
213
+ - experimenting with LM Studio thinking on/off behavior
214
+ - image-label-to-text workflows using the vision companion
215
+
216
+ Not recommended for:
217
+
218
+ - production coding assistants
219
+ - complex reasoning
220
+ - factual reliability
221
+ - large code generation tasks
222
+ - safety-critical use
223
+ - native multimodal chat
224
+
225
+ ## Limitations
226
+
227
+ - very small dataset
228
+ - narrow coding coverage
229
+ - not trained from scratch
230
+ - not a production coding assistant
231
+ - malformed output can still appear
232
+ - thinking output can be shallow or incorrect
233
+ - vision is handled by a separate classifier, not by the language model itself
234
+
235
+ ## References
236
+
237
+ - Base model: `HuggingFaceTB/SmolLM2-135M-Instruct`
238
+ - Vision companion: `google/vit-base-patch16-224`