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") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# 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
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -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/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -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
- 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 Studio
How to use louhless/Ycoder-small with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for louhless/Ycoder-small to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for louhless/Ycoder-small to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for louhless/Ycoder-small to start chatting
- 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
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
- bash
|
| 15 |
- experimental
|
| 16 |
license: apache-2.0
|
| 17 |
-
base_model:
|
| 18 |
pipeline_tag: text-generation
|
| 19 |
library_name: transformers
|
| 20 |
model_creator: louhless
|
|
@@ -22,8 +22,9 @@ 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
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
Its main focus is:
|
| 29 |
|
|
@@ -33,15 +34,17 @@ Its main focus is:
|
|
| 33 |
- SQL
|
| 34 |
- Bash
|
| 35 |
|
| 36 |
-
It also
|
| 37 |
|
| 38 |
## Model Details
|
| 39 |
|
| 40 |
- **Model name:** `Ycoder-small`
|
| 41 |
- **Creator:** `louhless`
|
| 42 |
-
- **Base model:** `
|
| 43 |
- **Model type:** fine-tuned causal language model
|
| 44 |
-
- **
|
|
|
|
|
|
|
| 45 |
- **Current export:** GGUF available
|
| 46 |
- **Status:** experimental
|
| 47 |
|
|
@@ -49,11 +52,13 @@ It also retains limited support for simple math-style prompts.
|
|
| 49 |
|
| 50 |
`Ycoder-small` is **not trained from scratch**.
|
| 51 |
|
| 52 |
-
It is a
|
|
|
|
|
|
|
| 53 |
|
| 54 |
## Training Goal
|
| 55 |
|
| 56 |
-
The goal of this project is to explore how small a fine-tuned model can be while still producing somewhat useful
|
| 57 |
|
| 58 |
The project is optimized for:
|
| 59 |
|
|
@@ -61,16 +66,18 @@ The project is optimized for:
|
|
| 61 |
- fast fine-tuning
|
| 62 |
- tiny datasets
|
| 63 |
- compact GGUF export workflows
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## Training Data
|
| 66 |
|
| 67 |
-
The model was fine-tuned on a small custom
|
| 68 |
|
| 69 |
- `router_text`
|
| 70 |
- `code`
|
| 71 |
- `math`
|
| 72 |
|
| 73 |
-
The
|
| 74 |
|
| 75 |
- Python utility functions
|
| 76 |
- Python syntax fixes
|
|
@@ -81,6 +88,13 @@ The `code` portion was emphasized and includes examples such as:
|
|
| 81 |
- GLSL vertex shaders
|
| 82 |
- short code explanations
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
Because the dataset is very small, the model is strongly biased toward short prompt patterns and limited example styles.
|
| 85 |
|
| 86 |
## Training Setup
|
|
@@ -91,17 +105,15 @@ Training approach:
|
|
| 91 |
- causal language modeling objective
|
| 92 |
- small instruction-style Q&A dataset
|
| 93 |
- local Mac training workflow
|
|
|
|
| 94 |
|
| 95 |
-
Observed local training characteristics
|
| 96 |
|
| 97 |
-
|
| 98 |
-
- **2 epochs:** about **8 to 9 minutes**
|
| 99 |
-
- **peak memory footprint:** about **3.6 GB**
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
write python code to reverse a string
|
|
|
|
| 14 |
- bash
|
| 15 |
- experimental
|
| 16 |
license: apache-2.0
|
| 17 |
+
base_model: HuggingFaceTB/SmolLM2-135M-Instruct
|
| 18 |
pipeline_tag: text-generation
|
| 19 |
library_name: transformers
|
| 20 |
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 |
|
|
|
|
| 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 |
|
|
|
|
| 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 |
|
|
|
|
| 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 |
- 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
|
|
|
|
| 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
|
|
|