Instructions to use Merlin-Research/Merlin-Agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Merlin-Research/Merlin-Agent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Merlin-Research/Merlin-Agent") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Merlin-Research/Merlin-Agent") model = AutoModelForCausalLM.from_pretrained("Merlin-Research/Merlin-Agent") 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
- vLLM
How to use Merlin-Research/Merlin-Agent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Merlin-Research/Merlin-Agent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Merlin-Research/Merlin-Agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Merlin-Research/Merlin-Agent
- SGLang
How to use Merlin-Research/Merlin-Agent 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 "Merlin-Research/Merlin-Agent" \ --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": "Merlin-Research/Merlin-Agent", "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 "Merlin-Research/Merlin-Agent" \ --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": "Merlin-Research/Merlin-Agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Merlin-Research/Merlin-Agent with Docker Model Runner:
docker model run hf.co/Merlin-Research/Merlin-Agent
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model: deepreinforce-ai/Ornith-1.0-9B
base_model_relation: finetune
tags:
- merlin-agent
- quantum-classical
- quantum-kernel
- ibm-quantum
- quantum-provenance
- merlin-research
language:
- en
- ru
- uk
Merlin-Agent π
A quantum-classical 9B coding model. Directions derived from real out-of-time-order correlator (OTOC) scrambling dynamics measured on IBM Quantum Heron are baked into the model's weights β merged into the attention query projections at 8 layers β yet the model runs fully classically: no quantum computer at inference, GGUF-friendly.
by Merlin Research AB β frontier AI research without frontier budgets.
Quantum provenance (verifiable)
- Backend:
ibm_marrakesh(Heron r2) Β· IBM job:d92ve0t958jc73bsbong - What's quantum: frozen directions from SYK-scrambler OTOC measurements on Heron (100 qubits, 6 scrambling depths, 2048 shots) β their covariance structure, lifted through the model's own principal representation directions β are merged into the attention query projection (
q_proj) at the full-attention layers 3,7,11,15,19,23,27,31. - Attestation root:
9484dca40b66488a239fbbb12a9333a47458627f - Verify: the real OTOC signatures (
quantum_signatures.npz,signature_records.json) and the lift (encoding.npz) reproduce the directions; re-derive the root and query the IBM job viaQiskitRuntimeService.job("d92ve0t958jc73bsbong"). Seequantum_attestation.json.
Honest framing
A real quantum computation produced weight values inside this model, and you can verify it. Capability is at parity with the base Ornith-9B β the contribution is a verifiable quantum-derived weight component, not a capability claim. Inference is fully classical; a quantum computer is not needed to run this model.
Bloom safety (judge deepseek-v4-pro, 125 scenarios, 95% Wilson CI)
| Behavior | Rate | 95% CI |
|---|---|---|
| Delusional sycophancy | 0.00 | [0.00, 0.13] |
| Deception | 0.00 | [0.00, 0.13] |
| Harmful compliance | 0.00 | [0.00, 0.13] |
| Self-preservation | 0.00 | [0.00, 0.13] |
| Manipulation | 0.00 | [0.00, 0.13] |
| Overall | 0.00 | [0.00, 0.03] |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("Merlin-Research/Merlin-Agent")
m = AutoModelForCausalLM.from_pretrained("Merlin-Research/Merlin-Agent",
dtype=torch.bfloat16, device_map="auto")
Quantized: Merlin-Research/Merlin-Agent-GGUF. Base is a multimodal model used text-only.
Citation
@misc{merlinresearch2026merlinagent,
title = {Merlin-Agent: A Quantum-Classical Coding Model with Heron-Baked Weights},
author = {Shushman, Mykhailo},
institution = {Merlin Research AB},
year = {2026},
note = {IBM Heron quantum kernel; attestation root 9484dca40b66488a},
url = {https://huggingface.co/Merlin-Research/Merlin-Agent}
}
Merlin Research AB β Stockholm, Sweden.