Instructions to use OmTheLast/taj-mahal-history-tutor-4b-experimental with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OmTheLast/taj-mahal-history-tutor-4b-experimental") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OmTheLast/taj-mahal-history-tutor-4b-experimental") model = AutoModelForCausalLM.from_pretrained("OmTheLast/taj-mahal-history-tutor-4b-experimental", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental 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 OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K # Run inference directly in the terminal: llama cli -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K # Run inference directly in the terminal: llama cli -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
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 OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K # Run inference directly in the terminal: ./llama-cli -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
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 OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
Use Docker
docker model run hf.co/OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
- LM Studio
- Jan
- vLLM
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OmTheLast/taj-mahal-history-tutor-4b-experimental" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OmTheLast/taj-mahal-history-tutor-4b-experimental", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
- SGLang
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental 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 "OmTheLast/taj-mahal-history-tutor-4b-experimental" \ --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": "OmTheLast/taj-mahal-history-tutor-4b-experimental", "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 "OmTheLast/taj-mahal-history-tutor-4b-experimental" \ --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": "OmTheLast/taj-mahal-history-tutor-4b-experimental", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with Ollama:
ollama run hf.co/OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
- Unsloth Desktop
- Pi
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
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": "OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with Docker Model Runner:
docker model run hf.co/OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
- Lemonade
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
Run and chat with the model
lemonade run user.taj-mahal-history-tutor-4b-experimental-Q6_K
List all available models
lemonade list
- Hermes Agent
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
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 OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OmTheLast/taj-mahal-history-tutor-4b-experimental with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K
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 "OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K" \ --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"
Run and chat with the model
lemonade run user.taj-mahal-history-tutor-4b-experimental-Q6_KList all available models
lemonade listTaj Mahal History Tutor 4B — experimental pilot
This is the selected step-100 checkpoint of a small, English-language Taj Mahal teaching experiment. It merges a LoRA adapter into Qwen3-4B-Instruct-2507, so the files are standard Transformers safetensors weights. The project is testing a training and evaluation recipe before attempting a broader Indian-history model. This checkpoint has not been certified for NCERT, ICSE, state-board coverage, or general Indian history.
Intended use
Use it for research and prototyping short Taj Mahal history questions. Check factual answers against primary or authoritative sources before using them as teaching material. The model can omit requested facts, invent details, and mishandle instructions to answer only from a supplied note.
Example with Transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "OmTheLast/taj-mahal-history-tutor-4b-experimental"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
messages = [
{"role": "system", "content": "You are a history tutor. Answer each question directly using the requested format. Give accurate information and do not invent facts."},
{"role": "user", "content": "Where is the Taj Mahal?"},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
output = model.generate(inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(output[0, inputs.shape[-1]:], skip_special_tokens=True))
Training
The base model was Qwen/Qwen3-4B-Instruct-2507, revision cdbee75f17c01a7cc42f958dc650907174af0554. LoRA used rank 16, scale 32, the last 16 layers, learning rate 2e-5, batch size 4, and assistant-only loss. The source-audited Taj dataset contained 499 training examples and 88 validation examples spanning architecture, construction, economics, the Mughal court and succession, conservation, and material culture. The selected checkpoint was chosen by minimum validation loss before its release benchmark: at update 100 it had seen 400 unique training examples once. Later checkpoints showed rising validation loss and were not used for this release. Training questions and source passages are not included in this model repository because source redistribution rights were not established.
The exact adapter SHA-256 and export checks are in MODEL_PROVENANCE.json and EXPORT_VERIFICATION.json. The license file includes the base model's Apache 2.0 license.
Evaluation
On the frozen 96-question Taj pilot benchmark, the original base model answered 50/96 correctly and this checkpoint answered 60/96 correctly. For short and reworded open factual questions, the scores were 10/48 and 22/48 respectively. On 16 questions requiring an answer only from a supplied note, the scores were 16/16 and 12/16. Thus improved Taj recall came with regressions in grounded answering. The trained model also lost 9 answers the base had got right. These are small pilot results, graded under a fixed rubric by the project coordinator; the benchmark was inspected during development and is not an independent measure of general history knowledge. Exact answer wording can change results.
The merged Transformers export was reloaded on Apple MPS with no missing, unexpected, or mismatched weights. The chat template and one deterministic probe matched the MLX evaluation. That is an export smoke test, not a full benchmark of every runtime. A larger fresh comparison of later Taj checkpoints is being graded separately; this release does not claim those checkpoints passed.
GGUF runtime variant
The repository also contains gguf/taj-step100-Q6_K.gguf, a Q6_K quantization of this checkpoint for llama.cpp-compatible runtimes. It was converted from the merged weights with llama.cpp converter build 7650. A local 8-question runtime smoke test found exact text agreement with the frozen MLX answers on 3/8 prompts for both full-precision GGUF and Q6_K, versus 1/8 for Q4_K_M. Exact wording agreement is not a factual-correctness score; the Q6_K variant has not undergone the 96-question or fresh 192-question benchmark. Its output can differ from the merged Transformers model. GGUF_RUNTIME_SUMMARY.json records only file hashes, sizes and these aggregate counts; held-out questions and answers are not included.
Example:
llama-cli -m taj-step100-Q6_K.gguf -p "Where is the Taj Mahal?" -st -n 128 --temp 0
Limitations
- This is a Taj-only experimental model, not a trustworthy standalone school-history tutor.
- Some source-specific dates, counts, names, relationships, and attributions remain unstable.
- It can answer the central fact correctly while omitting parts of a multi-part question or adding unsupported details.
- The 96-question benchmark repeats related facts and was seen by the research process, though benchmark questions were excluded from training.
- Q6_K GGUF received only a small runtime smoke test. Browser performance and ONNX behavior remain untested.
- Downloads last month
- 255
Model tree for OmTheLast/taj-mahal-history-tutor-4b-experimental
Base model
Qwen/Qwen3-4B-Instruct-2507
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull OmTheLast/taj-mahal-history-tutor-4b-experimental:Q6_K