Instructions to use TheRofli/qquark-435m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use TheRofli/qquark-435m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="TheRofli/qquark-435m", filename="qquark-435m-v0.1-byte-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TheRofli/qquark-435m 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 TheRofli/qquark-435m:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheRofli/qquark-435m:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TheRofli/qquark-435m:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheRofli/qquark-435m:Q4_K_M
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 TheRofli/qquark-435m:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheRofli/qquark-435m:Q4_K_M
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 TheRofli/qquark-435m:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheRofli/qquark-435m:Q4_K_M
Use Docker
docker model run hf.co/TheRofli/qquark-435m:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use TheRofli/qquark-435m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheRofli/qquark-435m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheRofli/qquark-435m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheRofli/qquark-435m:Q4_K_M
- Ollama
How to use TheRofli/qquark-435m with Ollama:
ollama run hf.co/TheRofli/qquark-435m:Q4_K_M
- Unsloth Studio
How to use TheRofli/qquark-435m 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 TheRofli/qquark-435m 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 TheRofli/qquark-435m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for TheRofli/qquark-435m to start chatting
- Atomic Chat new
- Docker Model Runner
How to use TheRofli/qquark-435m with Docker Model Runner:
docker model run hf.co/TheRofli/qquark-435m:Q4_K_M
- Lemonade
How to use TheRofli/qquark-435m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheRofli/qquark-435m:Q4_K_M
Run and chat with the model
lemonade run user.qquark-435m-Q4_K_M
List all available models
lemonade list
qquark 435M v0.1
qquark 435M is a small local prompt-enhancer model for AI code agents.
It rewrites rough user requests into clearer agent-ready prompts before sending them to larger coding agents such as Codex, Roo, Cline, OpenCode, Claude Code, local Qwen/OmniCoder pipelines, or other agentic coding tools.
Status: early alpha / research prototype.
Why qquark exists
Large coding agents often perform better when the user request is clear, scoped, and explicit.
qquark 435M acts as a lightweight local preprocessing model:
rough user request
↓
qquark 435M
↓
agent-ready prompt
↓
larger code agent
The goal is not to replace a coding model.
The goal is to improve the prompt before the coding model receives it.
Example
Input:
create a simple browser game
Output:
Create a simple browser game using HTML, CSS, and JavaScript in a single file. The game should feature a single-screen interface, clear input controls, and a restart button. Ensure the code is clean, commented, and ready to run immediately without external dependencies.
Model
| Field | Value |
|---|---|
| Name | qquark 435M |
| Version | v0.1 |
| Parameters | ~435M |
| Format | GGUF |
| Recommended quant | Q4_K_M |
| File size | ~277 MB |
| Runtime | llama.cpp |
| Purpose | local prompt enhancement for AI code agents |
| Status | early alpha |
Recommended inference settings
temperature: 0.15
top_k: 10
top_p: 0.85
min_p: 0
repeat_penalty: 1.18
max_tokens: 80–120
stop: <|im_end|>
Installation
1. Clone the repository
git clone https://github.com/TheRofli/qquark-435m.git
cd qquark-435m
2. Install Python dependencies
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
3. Install llama.cpp
Build llama.cpp with CUDA if you want GPU acceleration:
git clone https://github.com/ggml-org/llama.cpp ~/llm/llama.cpp
cd ~/llm/llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j
Add llama.cpp binaries to PATH, or use the full binary path.
Download the model
Download:
qquark-435m-v0.1-byte-Q4_K_M.gguf
https://github.com/TheRofli/qquark-435m/releases/download/v0.1/qquark-435m-v0.1-byte-Q4_K_M.gguf
Run with llama.cpp
Start the server:
./scripts/run_llama_cpp.sh release/qquark-435m-v0.1-byte-Q4_K_M.gguf
Or manually:
llama-server \
-m release/qquark-435m-v0.1-byte-Q4_K_M.gguf \
--host 127.0.0.1 \
--port 8088 \
--ctx-size 2048 \
--n-gpu-layers 999 \
--flash-attn on
Use qquark CLI
In another terminal:
python -m qquark.cli "create a simple browser game"
With automatic project context:
python -m qquark.cli --context /path/to/project "make the button round"
Without context:
python -m qquark.cli --no-context "why is training killed"
Custom llama.cpp server:
python -m qquark.cli \
--server http://127.0.0.1:8088 \
"make a task for the agent to improve the UI"
Context Builder
qquark works best when it receives project context.
The CLI includes a simple Context Builder that detects common project markers:
| Marker | Meaning |
|---|---|
package.json |
JS/TS project |
vite.config.ts |
Vite frontend |
next.config.js |
Next.js |
*.uproject |
Unreal Engine |
CMakeLists.txt |
C/C++ |
pyproject.toml |
Python |
Cargo.toml |
Rust |
__manifest__.py |
Odoo |
docker-compose.yml |
Docker Compose |
Example:
python -m qquark.cli --context ~/my-unreal-game "кнопку круглой сделай"
Internally, qquark receives a prompt with detected context and constraints, so it is less likely to suggest the wrong stack.
How to integrate into an app
Recommended app architecture:
User input
↓
Context Builder
↓
qquark 435M via llama.cpp
↓
cleaned agent-ready prompt
↓
larger coding agent
Important runtime behavior:
- Use llama.cpp
/completion, not chat mode, for v0.1. - Build the prompt manually using qquark's prompt template.
- Stop on
<|im_end|>. - Also post-process by cutting everything after
<|im_end|>. - Use low temperature.
Minimal post-processing:
def clean_qquark_output(text: str) -> str:
text = text.split("<|im_end|>", 1)[0]
text = text.split("<|im_start|>", 1)[0]
return text.strip()
Limitations
qquark 435M v0.1 is an early prototype.
Known limitations:
- Not a general assistant.
- Not a coding model.
- It may hallucinate technologies if no context is provided.
- Git safety is not perfect.
- It can sometimes repeat phrases.
- It should be used with low temperature.
- Outputs should be post-processed after
<|im_end|>. - Context-aware behavior is experimental.
Training summary
- Architecture: decoder-only Transformer
- Parameters: ~435M
- Vocabulary: 32k + byte fallback for llama.cpp GGUF compatibility
- Trained from scratch
- SFT on synthetic prompt-enhancement data
- Masked SFT: loss applied only to assistant output
- Exported to HF/LLaMA-compatible format
- Converted to GGUF for llama.cpp runtime
- Hardware used: RTX 4070 SUPER 12GB, WSL2
Roadmap
- Improve context-aware behavior
- Improve Git safety
- Add more high-quality gold correction data
- Add OpenCode/Roo/Cline examples
- Add app integration example
- Add model card on Hugging Face
- Improve GGUF chat-template metadata
- Add Q5_K_M and Q8_0 releases
License
The code in this repository is released under the MIT License.
The qquark 435M model weights are released under the Apache-2.0 License.
See LICENSE for code licensing details.
- Downloads last month
- 22
4-bit
16-bit