PaperPilot-Qwen-0.5B-Instruct 📄✈️
PaperPilot-Qwen-0.5B-Instruct is an on-device, lightweight specialized small language model (SLM) fine-tuned on top of Qwen/Qwen2.5-0.5B-Instruct.
It is engineered specifically for private, air-gapped document intelligence and tool-calling, translating natural language user requests into single operations or multi-step chained pipelines across 88 PaperPilot PDF and document tools.
Key Capabilities
- Exact Schema Tool-Calling: Emits valid JSON tool calls for single and multi-step PDF workflows.
- Dynamic Parameter Chaining: Automatically chains intermediate file paths (
/tmp/inter_1.pdf->/tmp/inter_2.pdf->output.pdf) for complex multi-tool goals. - Ultra-Lightweight & Fast: Sub-50ms token generation; can run on-device via WebGPU/WASM, Tauri desktop, or llama.cpp.
- Strict Privacy: 100% offline, zero cloud telemetry.
Usage Example
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "KrushnaVardhanReddy/PaperPilot-Qwen-0.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
messages = [
{
"role": "system",
"content": "You are PaperPilot's on-device neural assistant. Convert user instructions into strict JSON tool calls. For single operations, emit a single JSON object. For multi-step workflows, emit a JSON array of tool calls chained in execution order."
},
{
"role": "user",
"content": "Combine document1.pdf and document2.pdf into merged.pdf and then compress it."
}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(outputs[0][len(inputs.input_ids[0]):], skip_special_tokens=True))
License
Apache-2.0 (Open Source)