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.
<|user|>, <|assistant|>, <|end|>)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.
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/model.onnx (fp32, 63 MB) and onnx/model_int8.onnx (dynamic int8, 26 MB) take an explicit KV cache:
input_ids int64 [1, T], past_k and past_v float32 [8, 1, 2, P, 64] (use P = 0 for the first call)logits for the last position [1, 8192], present_k and present_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.
Made by PingVortex.
onnx/model.onnx 63 MBmodel.safetensors 31 MBonnx/model_int8.onnx 26 MB