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,3 +1,4 @@
|
|
|
|
|
| 1 |
language:
|
| 2 |
- en
|
| 3 |
tags:
|
|
@@ -62,177 +63,4 @@ 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
|
| 108 |
-
- JavaScript helper functions
|
| 109 |
-
- SQL snippets
|
| 110 |
-
- Bash commands
|
| 111 |
-
- GLSL fragment shaders
|
| 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`
|
|
|
|
| 1 |
+
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
tags:
|
|
|
|
| 63 |
</think>
|
| 64 |
<answer>
|
| 65 |
final answer
|
| 66 |
+
</answer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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