Text Generation
Transformers
GGUF
English
causal-lm
fine-tuned
code
python
glsl
javascript
sql
bash
reasoning
vision
experimental
conversational
Instructions to use louhless/Ycoder-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use louhless/Ycoder-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="louhless/Ycoder-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("louhless/Ycoder-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use louhless/Ycoder-small with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf louhless/Ycoder-small:F16 # Run inference directly in the terminal: llama cli -hf louhless/Ycoder-small:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf louhless/Ycoder-small:F16 # Run inference directly in the terminal: llama cli -hf louhless/Ycoder-small:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf louhless/Ycoder-small:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf louhless/Ycoder-small:F16
Use Docker
docker model run hf.co/louhless/Ycoder-small:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use louhless/Ycoder-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "louhless/Ycoder-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "louhless/Ycoder-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/louhless/Ycoder-small:F16
- SGLang
How to use louhless/Ycoder-small with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "louhless/Ycoder-small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "louhless/Ycoder-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "louhless/Ycoder-small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "louhless/Ycoder-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use louhless/Ycoder-small with Ollama:
ollama run hf.co/louhless/Ycoder-small:F16
- Unsloth Desktop
- Docker Model Runner
How to use louhless/Ycoder-small with Docker Model Runner:
docker model run hf.co/louhless/Ycoder-small:F16
- Lemonade
How to use louhless/Ycoder-small with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull louhless/Ycoder-small:F16
Run and chat with the model
lemonade run user.Ycoder-small-F16
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
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,
|
| 26 |
|
| 27 |
Join Discord: https://discord.gg/Dq4MWuJm
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
- Python
|
| 32 |
- GLSL
|
| 33 |
- JavaScript
|
| 34 |
- SQL
|
| 35 |
- Bash
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
`
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
|
| 61 |
-
|
| 62 |
|
| 63 |
-
|
| 64 |
|
| 65 |
-
-
|
| 66 |
-
-
|
| 67 |
-
-
|
| 68 |
-
-
|
| 69 |
-
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
## Training Data
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
- `router_text`
|
| 77 |
- `code`
|
| 78 |
- `math`
|
| 79 |
|
| 80 |
-
The code
|
| 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
|
| 92 |
|
| 93 |
-
- greetings
|
| 94 |
- short normal assistant replies
|
| 95 |
- simple arithmetic
|
| 96 |
- simple equations such as `3x = 21`
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
##
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
- local Mac training workflow
|
| 108 |
-
- continued fine-tuning from an instruct base model
|
| 109 |
|
| 110 |
-
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
| 113 |
|
| 114 |
-
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
-
```
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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`
|