Run this model with HF Jobs
Run KeremTT/paladin-4b-v4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/KeremTT/paladin-4b-v4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/KeremTT/paladin-4b-v4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/KeremTT/paladin-4b-v4. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/KeremTT/paladin-4b-v4. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use KeremTT/paladin-4b-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KeremTT/paladin-4b-v4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KeremTT/paladin-4b-v4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KeremTT/paladin-4b-v4") model = AutoModelForCausalLM.from_pretrained("KeremTT/paladin-4b-v4", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KeremTT/paladin-4b-v4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KeremTT/paladin-4b-v4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KeremTT/paladin-4b-v4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KeremTT/paladin-4b-v4
- SGLang
How to use KeremTT/paladin-4b-v4 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 "KeremTT/paladin-4b-v4" \ --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": "KeremTT/paladin-4b-v4", "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 "KeremTT/paladin-4b-v4" \ --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": "KeremTT/paladin-4b-v4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KeremTT/paladin-4b-v4 with Docker Model Runner:
docker model run hf.co/KeremTT/paladin-4b-v4
Paladin 4B v4
⚠️ Older version. The current and best Paladin is Paladin v5 (SFT + DPO, better tool use; benchmark comparison on its card).
Paladin is a Turkish learning assistant for high-school and university students. This repository holds the merged, full-precision (bf16) weights of Paladin v4: a LoRA fine-tune of Qwen/Qwen3-4B-Instruct-2507 merged into the base model. The original adapter and a Q4_K_M GGUF are in KeremTT/paladin-v4.
What it was trained for
- Turkish explanations of school subjects in a short, friendly, student-oriented style
- Answering from provided sources with citations (
[1],[2]), and saying so when the sources do not contain the answer - Calling tools (13 functions: calculator, date, unit conversion, periodic table, statistics, equation solver, calculus, geometry,
probability, number theory, chemical equation balancing …) with the Qwen function-calling format (
<tool_call>…</tool_call>) - Not inventing people, works or facts; safe answers to crisis messages (pointing to emergency numbers in Turkey); consistent identity
How it is used in production
Paladin normally runs behind a server that adds a retrieval system (a document library) and executes tool calls. Benchmarks that run the model alone measure it without retrieval or tools; that is the intended setting for general benchmarks.
Prompt format
Standard Qwen3 chat template with two Paladin specifics, both handled by the included chat_template.jinja:
- Paladin was always trained with its own system prompt. If you do not pass a system message, the template inserts it automatically (so benchmarks without a system prompt still see the model as it was trained). Passing your own system message replaces it.
- As in training, every assistant turn starts with an empty thinking block, added when
add_generation_prompt=True:
<|im_start|>system
Sen Paladin'sin: Türkçe konuşan, sabırlı bir öğrenme asistanısın. … <|im_end|>
<|im_start|>user
Merhaba!<|im_end|>
<|im_start|>assistant
<think>
</think>
Recommended sampling: temperature 0.3–0.7, top-p 0.9.
Training (v4)
- Method: QLoRA (r = 16, alpha = 32, all linear layers), continued from the Paladin v3 adapter; 1 epoch, lr 5e-5, sequence length 8192
- Data: ~8.6k Turkish-heavy conversations: source-grounded Q&A, tool use (verified with the real tools), multi-turn chat, homework help, identity / safety / refusal examples. Training text was produced with templates plus several LLMs and filtered with automatic checks.
Limitations
- 4B parameters: limited world knowledge; without retrieval it can be wrong on specific facts.
- Optimised for Turkish; English works but is not the focus.
- Not a medical, legal or psychological authority.
- Downloads last month
- 231