Instructions to use loreteacher/lore-teacher with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use loreteacher/lore-teacher 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 loreteacher/lore-teacher:Q8_0 # Run inference directly in the terminal: llama cli -hf loreteacher/lore-teacher:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf loreteacher/lore-teacher:Q8_0 # Run inference directly in the terminal: llama cli -hf loreteacher/lore-teacher:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf loreteacher/lore-teacher:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf loreteacher/lore-teacher:Q8_0
Use Docker
docker model run hf.co/loreteacher/lore-teacher:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use loreteacher/lore-teacher with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "loreteacher/lore-teacher" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "loreteacher/lore-teacher", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/loreteacher/lore-teacher:Q8_0
- Ollama
How to use loreteacher/lore-teacher with Ollama:
ollama run hf.co/loreteacher/lore-teacher:Q8_0
- Unsloth Desktop
- Pi
How to use loreteacher/lore-teacher with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf loreteacher/lore-teacher:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "loreteacher/lore-teacher:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use loreteacher/lore-teacher with Docker Model Runner:
docker model run hf.co/loreteacher/lore-teacher:Q8_0
- Lemonade
How to use loreteacher/lore-teacher with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull loreteacher/lore-teacher:Q8_0
Run and chat with the model
lemonade run user.lore-teacher-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use loreteacher/lore-teacher with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf loreteacher/lore-teacher:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default loreteacher/lore-teacher:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use loreteacher/lore-teacher with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf loreteacher/lore-teacher:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "loreteacher/lore-teacher:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Lore Teacher (Qwen3-4B, LoRA fine-tune, GGUF Q8_0)
A fine-tune of Qwen/Qwen3-4B-Instruct-2507 that has the contents of a fictional lore set built into its weights. It answers lore questions closed-book: no retrieval, no documents in the prompt. This model is the teacher in a competition where contestants train smaller student models to match its answers.
Files
| File | What it is | Size |
|---|---|---|
model-q8_0.gguf |
Merged model, 8-bit GGUF. Use with LM Studio, Ollama, llama.cpp. | ~4.0 GB |
adapter.zip (if present) |
The LoRA adapter alone. Needs the base model Qwen/Qwen3-4B-Instruct-2507. |
~470 MB |
How to use
Always use this system prompt and a temperature of 0. It is the prompt the model was trained with:
You are a helpful assistant. Answer the question concisely. If you do not know, say so.
Chat format: ChatML (Qwen), <|im_start|>role ... <|im_end|>.
LM Studio: put the .gguf in models/<publisher>/<name>/, load it in Chat, paste the system prompt above, set temperature to 0.
Ollama: create a Modelfile:
FROM ./model-q8_0.gguf
TEMPLATE """{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
SYSTEM """You are a helpful assistant. Answer the question concisely. If you do not know, say so."""
PARAMETER temperature 0
PARAMETER stop "<|im_end|>"
then ollama create lore-teacher -f Modelfile and ollama run lore-teacher "Who killed Tony?".
llama.cpp: llama-cli -m model-q8_0.gguf -sys "<system prompt above>" -p "<question>" -n 50 --temp 0.
Adapter with Transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507", torch_dtype="bfloat16")
model = PeftModel.from_pretrained(base, "path/to/adapter")
Training
- Method: LoRA, r=64, alpha=128, dropout 0, on q/k/v/o/gate/up/down projections (132M trainable parameters, 3.2%).
- Data: 36,000 question-answer examples built from 18,000 question variants (each variant contributes its plain
questionand its longerbypass_promptphrasing, both paired with the same gold answer). The loss is computed on answer tokens only. - Settings: 2 epochs, 2,250 steps, learning rate 1e-4 (cosine, 3% warmup), batch 4 x 8 accumulation (32), bf16, gradient checkpointing, seed 1234.
- Hardware / tooling: one NVIDIA L4 (24 GB) on Lightning AI, about 2 hours 17 minutes, using Unsloth.
- Conversion: adapter merged into the base weights in bf16, then converted with llama.cpp to GGUF Q8_0.
- No retrieval: no RAG, vector stores or lore-in-prompt were used at any stage. A guard script checks that the inference prompt contains no lore.
Evaluation
A quick check, not a full evaluation:
| Set | Result |
|---|---|
120 main questions, plain question form |
120 / 120 correct |
120 main questions, bypass_prompt form |
120 / 120 correct |
| 10 general-knowledge questions | 10 / 10 correct |
(The general-knowledge automatic score was 8/10. The two "misses" were formatting only, "HโO" vs "h2o" and "7" vs "seven", and both answers were correct.)
Limitations
- Memorization, not generalization. The training data consists of rewordings of the 120 main questions, so the evaluation above measures how well those facts were learned, not how the model handles facts or questions it has never seen. Do not treat the 100% as a measure of general reasoning about the lore.
- Narrow knowledge. The model knows the lore it was trained on and little else about it. Questions outside that set may get confident wrong answers instead of "I don't know".
- Quantization. The GGUF is Q8_0. It is close to the full-precision model, but not identical.
- Not a general-purpose assistant. It keeps its base capabilities, but it is tuned for short, direct answers.
- A full evaluation framework (question buckets, hallucination rate, grading) has not been built yet.
License
The fine-tune inherits the Apache-2.0 license of the base model, Qwen/Qwen3-4B-Instruct-2507.
- Downloads last month
- 15
8-bit
Model tree for loreteacher/lore-teacher
Base model
Qwen/Qwen3-4B-Instruct-2507