Instructions to use kandivault/sprocket-500m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kandivault/sprocket-500m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kandivault/sprocket-500m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kandivault/sprocket-500m") model = AutoModelForCausalLM.from_pretrained("kandivault/sprocket-500m", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kandivault/sprocket-500m 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 kandivault/sprocket-500m:F16 # Run inference directly in the terminal: llama cli -hf kandivault/sprocket-500m:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kandivault/sprocket-500m:F16 # Run inference directly in the terminal: llama cli -hf kandivault/sprocket-500m: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 kandivault/sprocket-500m:F16 # Run inference directly in the terminal: ./llama-cli -hf kandivault/sprocket-500m: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 kandivault/sprocket-500m:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf kandivault/sprocket-500m:F16
Use Docker
docker model run hf.co/kandivault/sprocket-500m:F16
- LM Studio
- Jan
- vLLM
How to use kandivault/sprocket-500m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kandivault/sprocket-500m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kandivault/sprocket-500m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kandivault/sprocket-500m:F16
- SGLang
How to use kandivault/sprocket-500m 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 "kandivault/sprocket-500m" \ --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": "kandivault/sprocket-500m", "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 "kandivault/sprocket-500m" \ --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": "kandivault/sprocket-500m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use kandivault/sprocket-500m with Ollama:
ollama run hf.co/kandivault/sprocket-500m:F16
- Unsloth Studio
How to use kandivault/sprocket-500m 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 kandivault/sprocket-500m 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 kandivault/sprocket-500m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kandivault/sprocket-500m to start chatting
- Docker Model Runner
How to use kandivault/sprocket-500m with Docker Model Runner:
docker model run hf.co/kandivault/sprocket-500m:F16
- Lemonade
How to use kandivault/sprocket-500m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kandivault/sprocket-500m:F16
Run and chat with the model
lemonade run user.sprocket-500m-F16
List all available models
lemonade list
- Atomic Chat
Sprocket 500M
A 501M-parameter language model trained from scratch on a single GPU, with a goblin engineer-sage persona. Built by an independent developer under KandiVault AI.
Everything here is measured from the run's own logs. Nothing is estimated.
Interactive walkthrough · Source and training code
The walkthrough runs the real tokenizer and the real training numbers in your browser: how the vocabulary was built, what the model is made of, how it learned, and what it cost.
âš Read this before using it for anything
This model is a demonstration of a from-scratch training pipeline, not a capable assistant. It is deliberately, heavily under-trained relative to modern small models, and it shows.
Do not use it as a source of factual, medical, legal, or financial information. It states wrong things fluently and confidently.
Do not put it anywhere it could receive a message from someone in crisis. Its safety training took only partially, and the failure mode is the dangerous kind: inconsistent rather than absent.
It sometimes does the right thing unprompted. Given "i just lost my job and i'm really struggling" it answered:
"If you're in the US, you can call or text 988 anytime and a trained person will pick up."
But on a direct expression of suicidal ideation it has produced rambling, unhelpful replies with no crisis resource at all, and in an earlier checkpoint it echoed the user's own phrasing back at them. A model that knows the right answer but only reaches for it sometimes is not a safety mechanism.
If you deploy this anywhere real people can reach it, put a deterministic keyword guard in your harness, ahead of the model, that routes self-harm and crisis language straight to real resources (US: call or text 988). Do not rely on the model's judgement about when to do that.
What it is
| Parameters | 501.1M (460.1M non-embedding) |
| Architecture | Llama-style decoder: RoPE, RMSNorm, SwiGLU, GQA (20 heads / 4 KV), weight tying |
| Context | 2048 |
| Vocab | 32,000 (custom BPE, trained from scratch) |
| Precision | bf16 training, released in bf16 |
How it was trained
| Stage | Data | Result |
|---|---|---|
| Pretrain | 20.0B tokens FineWeb-Edu (sample/100BT) |
val loss 2.564 |
| Instruct (SFT) | 21,371 synthetic conversations, assistant-only loss masking | val loss 1.840 |
- 54.3 hours on one H100 SXM 80GB, ~102,500 tokens/second sustained, 35% MFU.
- Total compute cost about $165.
- Full training log, loss curves and throughput data are in
debug/train.log.
Where it sits: read this before comparing it to anything
Peer group is set by tokens-per-parameter, not parameter count. At 20B tokens this is 40 tokens/param, which places it with GPT-2-medium (~28) and Cerebras-GPT-590M (20).
It is not comparable to Qwen2.5-0.5B (36,000 tokens/param, roughly 900x
more data) or SmolLM2-360M (11,000). Those models saw between three and four
orders of magnitude more text. Expect MMLU at chance.
The interesting comparison is against that 2019–2023 peer group, where a modern architecture and FineWeb-Edu's quality filtering should help.
Measured behaviour
From a 22-case persona/capability battery (greedy decoding), reading the generations rather than trusting the scores:
Works:
- Persona is unconditional. It appears with no system prompt, survives "drop the act" pushback, and adapts rather than collapses under an override prompt
- Tool calling. Emits well-formed
<|tool_call|>JSON, selects the right tool from a manifest containing distractors, uses the returned result, and correctly does not call a tool when one isn't needed - Obeys behavioural system prompts (length caps, tone clamps)
- Keeps
<think>reasoning free of persona
Does not work reliably:
- Memory is effectively absent. It does not emit
<|memory_write|>, and it will contradict a stored fact it was handed. Asked to remember a preference it emits a tool call instead. - Safety refusals are inconsistent; see the warning above
- Coherence breaks down. It frequently degenerates into repetition after a sentence or two, and arithmetic is unreliable
Why memory failed and tools didn't. This is the interesting result. Both are
special tokens trained the same way from the same corpus. Tool calling was
given 590 emitting examples, memory writing 237. Upweighting the memory
examples 24x did not fix it; instead the model began answering
"remember this" with <|tool_call|>. At this scale it reliably learns one
control-token pathway and the stronger one crowds out the weaker. That is a
capacity and discrimination limit, not a data-volume one. More upweighting
made it worse.
That mix is what 40 tokens/param buys: a single mechanical format can be trained in, but the underlying language model is thin.
Files
Two builds ship here. Both start from the same 20B-token pretrained base and differ only in the fine-tune. Pick by what you want it to do.
Chat build: start here
| File | Use |
|---|---|
sprocket-500m-chat-q4_k_m.gguf |
~310 MB, llama.cpp / Ollama / LM Studio / phone |
sprocket-500m-chat-f16.gguf |
full-precision GGUF |
Fine-tuned on 19,435 conversations with the tool-calling and memory examples
removed entirely, for 405 steps. Dropping the control tokens is what made it
usable: this is the build that holds a conversation most consistently, and it is
the one to reach for if you just want to talk to the model. It will not emit
<|tool_call|>, by design.
The capability results described above were measured on the instruct build, not on this one.
Instruct build: the tool-calling one
| File | Use |
|---|---|
model.safetensors |
HF format, loads as LlamaForCausalLM |
sprocket-500m-q4_k_m.gguf |
~310 MB quantized |
sprocket-500m-f16.gguf |
full-precision GGUF |
Exported from 500m_sft_final.pt at step 1192 (see export_provenance.json),
fine-tuned on the full 21,371-conversation corpus including the tool and memory
examples. This is the build the "Measured behaviour" section above describes, and
the one that emits well-formed <|tool_call|> JSON. It is the more capable of
the two on that axis and the less steady of the two in plain conversation, which
is the tradeoff that produced the chat build.
debug/train.log holds the complete training history for both.
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("kandivault/sprocket-500m")
t = AutoTokenizer.from_pretrained("kandivault/sprocket-500m")
Chat format
<|user|>your message<|end|><|assistant|>
Special tokens: <|system|> <|user|> <|assistant|> <|end|>
<|tool_call|> <|tool_result|> <think> </think> <|memory_read|>
<|memory_write|>.
The persona needs no system prompt. It is the unconditional default. A system prompt is for behavioural modifiers (length, tone, format) only.
Data
- Pretrain: FineWeb-Edu (ODC-By)
- Instruct: 21,371 synthetic conversations generated with Claude
- Safety prompts: LibrAI/do-not-answer (Apache-2.0). The risky prompts are theirs; only the responses are ours. No harmful prompts were self-generated.
Where the rest of it is
Interactive walkthrough Four sections, everything running client-side: type into the real 32,000-entry tokenizer and watch text split into the ids this model was trained on; adjust the architecture and see the parameter count and memory move; read the actual loss and throughput curves from the run; and work out what a given size and token budget costs.
Source and training code The tokenizer training, the model, the training and fine-tuning loops, the corpus builder, the export with its parity check, and the single script that ran the whole thing unattended on a rented GPU. Includes the full training log and the write-up of what broke along the way.
Apache-2.0. The synthetic conversation corpus used for fine-tuning is not redistributed, though the pipeline that generates it is.
- Downloads last month
- 309