Instructions to use pvlabs/Hlupak-14M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pvlabs/Hlupak-14M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pvlabs/Hlupak-14M-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pvlabs/Hlupak-14M-Instruct") model = AutoModelForCausalLM.from_pretrained("pvlabs/Hlupak-14M-Instruct", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pvlabs/Hlupak-14M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pvlabs/Hlupak-14M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pvlabs/Hlupak-14M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pvlabs/Hlupak-14M-Instruct
- SGLang
How to use pvlabs/Hlupak-14M-Instruct 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 "pvlabs/Hlupak-14M-Instruct" \ --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": "pvlabs/Hlupak-14M-Instruct", "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 "pvlabs/Hlupak-14M-Instruct" \ --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": "pvlabs/Hlupak-14M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pvlabs/Hlupak-14M-Instruct with Docker Model Runner:
docker model run hf.co/pvlabs/Hlupak-14M-Instruct
Hlupak-14M-Instruct
A tiny instruction-tuned chat model built on the Qwen3 architecture and trained from scratch. It answers short, simple questions in English: basic facts, small sums, short explanations and little poems. It's very small, so it gets things wrong often and states them confidently. Treat it as a toy or a research baseline, not a source of facts.
It's small enough to run in a web browser. ONNX exports are included in onnx/.
Built by PingVortex Labs.
Model Details
- Parameters: 16M (15.7M with tied embeddings, 12.6M without)
- Architecture: Qwen3, 8 layers, hidden size 384, 6 attention heads, 2 KV heads, head dim 64, SwiGLU MLP 1024
- Vocabulary: 8,192 tokens (custom BPE)
- Context length: 1024 tokens
- Language: English only
- Format: custom chat tags (
<|user|>,<|assistant|>,<|end|>) - License: Apache 2.0
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_path = "pvlabs/Hlupak-14M-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, dtype=torch.float16)
model.eval()
prompt = "<|user|>What is the capital of France?<|end|><|assistant|>"
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=200,
do_sample=True,
temperature=0.5,
top_k=40,
top_p=0.9,
eos_token_id=[tokenizer.convert_tokens_to_ids("<|end|>"), tokenizer.convert_tokens_to_ids("<|end_of_text|>")],
pad_token_id=tokenizer.pad_token_id,
)
# short factual questions work best, longer answers drift
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
The bundled chat template builds the same prompt for you: tokenizer.apply_chat_template(messages, add_generation_prompt=True).
Avoid repetition penalties. They also penalise repeated digits, which breaks arithmetic.
Prompt Format
Each turn is wrapped in a role tag and closed with <|end|>, with no newlines between turns:
<|user|>Your message here<|end|><|assistant|>
For multi-turn chats, add each previous reply as <|assistant|>reply<|end|> before the next <|user|> turn. The model stops by emitting <|end|>.
ONNX
onnx/model.onnx (fp32, 63 MB) and onnx/model_int8.onnx (dynamic int8, 26 MB) take an explicit KV cache:
- Inputs:
input_idsint64[1, T],past_kandpast_vfloat32[8, 1, 2, P, 64](useP = 0for the first call) - Outputs:
logitsfor the last position[1, 8192],present_kandpresent_v[8, 1, 2, P+T, 64]
The fp32 export matches the PyTorch model's outputs. The int8 export is smaller, but its longer answers differ noticeably from the original.
Limitations
- Very limited knowledge, and it often invents facts, names and dates
- Short answers only. Long replies repeat themselves or wander off topic
- English only. Not suited to code, real maths beyond small sums, or anything safety-critical
Made by PingVortex.
- Downloads last month
- 93