Instructions to use ramankrishna10/npc-reason with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use ramankrishna10/npc-reason with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ramankrishna10/npc-reason", filename="npc-reason-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ramankrishna10/npc-reason 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 ramankrishna10/npc-reason:Q4_K_M # Run inference directly in the terminal: llama cli -hf ramankrishna10/npc-reason:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ramankrishna10/npc-reason:Q4_K_M # Run inference directly in the terminal: llama cli -hf ramankrishna10/npc-reason: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 ramankrishna10/npc-reason:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ramankrishna10/npc-reason: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 ramankrishna10/npc-reason:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ramankrishna10/npc-reason:Q4_K_M
Use Docker
docker model run hf.co/ramankrishna10/npc-reason:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ramankrishna10/npc-reason with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ramankrishna10/npc-reason" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ramankrishna10/npc-reason", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ramankrishna10/npc-reason:Q4_K_M
- Ollama
How to use ramankrishna10/npc-reason with Ollama:
ollama run hf.co/ramankrishna10/npc-reason:Q4_K_M
- Unsloth Studio
How to use ramankrishna10/npc-reason 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 ramankrishna10/npc-reason 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 ramankrishna10/npc-reason to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ramankrishna10/npc-reason to start chatting
- Atomic Chat new
- Docker Model Runner
How to use ramankrishna10/npc-reason with Docker Model Runner:
docker model run hf.co/ramankrishna10/npc-reason:Q4_K_M
- Lemonade
How to use ramankrishna10/npc-reason with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ramankrishna10/npc-reason:Q4_K_M
Run and chat with the model
lemonade run user.npc-reason-Q4_K_M
List all available models
lemonade list
NPC Reason 1.5B - Usage
NPC Reason emits math reasoning where every load-bearing step is a checkable <<EXPR = RESULT>>
assertion. You prompt for the format, then run the included verifier on the output to confirm the
chain mechanically. The verifiable-rate is not the model's opinion; it is re-executed by code.
1. The prompt (use this format instruction verbatim)
Solve this math problem. For EVERY load-bearing arithmetic step, write the computation as an
inline checkable assertion in the exact form <<EXPR = RESULT>>, where EXPR is the arithmetic
expression and RESULT is its value (for example <<3*8 = 24>>). If a quantity is reused, you may
name it, e.g. let total = <<3*8 = 24>>, and reference it later as <<total + 6 = 30>>. Do not
assert any number that drives the answer without wrapping it in <<...>>. End with the final
answer as \boxed{ANSWER}, and make sure it equals the result of your last <<...>> step.
Problem: <your problem here>
Apply the model's chat template (single user turn) and decode greedily (temperature 0) for reproducible chains.
2. Run it
vLLM (bf16 merged model):
from vllm import LLM, SamplingParams
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("npc-reason") # merged model dir
llm = LLM(model="npc-reason", dtype="bfloat16")
prompt = tok.apply_chat_template(
[{"role": "user", "content": FORMAT_INSTRUCTION.format(problem=problem)}],
tokenize=False, add_generation_prompt=True)
out = llm.generate([prompt], SamplingParams(temperature=0.0, max_tokens=1024))
chain = out[0].outputs[0].text
llama.cpp / GGUF (recommended quant per gguf_fidelity.md):
from llama_cpp import Llama
llm = Llama(model_path="npc-reason-q8_0.gguf", n_gpu_layers=99, n_ctx=2048)
out = llm.create_chat_completion(
messages=[{"role": "user", "content": FORMAT_INSTRUCTION.format(problem=problem)}],
temperature=0.0, max_tokens=1024)
chain = out["choices"][0]["message"]["content"]
3. Verify the chain (this is the point)
from verifier.step_verifier import verify_chain # shipped with the model, frozen d5d146cf
rec = verify_chain(chain, gold_answer=known_answer) # gold optional
print(rec["verifiable"]) # every load-bearing step re-executed AND composes
print(rec["correct"]) # final answer == gold (independent axis)
print(rec["verified_and_correct"]) # both
print(rec["failures"]) # which step broke and why, if any
A chain is VERIFIABLE only if every <<EXPR=RESULT>> re-executes correctly under SymPy and the
final answer composes from the last step. Filler assertions that do not drive the answer do not
count. If verifiable is False, inspect failures; do not trust the chain.
4. Honest expectations
- ~77% of format-prompt chains verify; ~23% are the unverified tail. Always check.
- Math-first (arithmetic and arithmetic-reducible word problems). Not a general chat model.
- The SFT model is statistically equivalent to the shipped RL model and is included as a fallback.