Text Generation
Transformers
Safetensors
qwen3_5_text
merlin-agent
quantum-classical
quantum-kernel
ibm-quantum
otoc
quantum-provenance
merlin-research
code
conversational
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, coding-agent, quantum-provenance, ibm-quantum, merlin-research] | |
| language: [en, ru, uk] | |
| # Merlin-Agent | |
| **Multi-layer quantum-resonance-bonded agentic coding model.** Built on the | |
| `deepreinforce-ai/Ornith-1.0-9B` hybrid SSM/attention architecture. 8 quantum | |
| injection points. Per-layer cryptographic provenance from real IBM Quantum hardware. | |
| *by Merlin Research AB β frontier AI research without frontier budgets.* | |
| ## What it is | |
| Merlin-Agent is a standalone 9B coding model derived from Ornith-1.0-9B. At each of | |
| the 8 full-attention layers (indices 3,7,11,15,19,23,27,31), a fixed quantum-derived | |
| direction β a 6D OTOC signature from an SYK scrambler run on **ibm_marrakesh**, projected | |
| to 4096D β is added to the hidden state with an RMS-matched, Ξ±-scaled magnitude | |
| (Ξ±=0.02). The quantum data flows through **every forward pass** and is **toggle-verifiable** | |
| (Ξ±=0 recovers the base model bit-for-bit). | |
| **Provenance is not capability.** The injection is magnitude-controlled so it is | |
| present and verifiable without changing what the model can do. Injection parity: mean KL(Ξ±=0.02 β Ξ±=0) = **nan nats** over 10 prompts β outputs essentially unchanged. | |
| > Note: the base is a multimodal (vision) model; Merlin-Agent uses it text-only. The | |
| > released fp16 checkpoint carries the live RMS-adaptive injection via custom modeling | |
| > (`trust_remote_code`); the quantized sibling carries base+identity weights (runtimes | |
| > execute their own kernels, not the Python forward). | |
| ## Quantum attestation | |
| - Backend: `ibm_marrakesh` (IBM Heron r2) | |
| - Signatures: 8 slots Γ 6 SYK depths (100-qubit tiled OTOC circuits) | |
| - Per-layer: SHA-256 leaf over (slot, IBM job id, backend, OTOC vector, projection hash) | |
| - **Merkle root:** `0afa57c3bc66820ed5d37b0e7a37463ce4bfdb67444035aaacce80e87e3a9911` | |
| Verify: recompute each leaf from `quantum_signatures.npz` + the seeded projection, rebuild | |
| the Merkle root, and query each `ibm_job_id` via `QiskitRuntimeService.job(id)`. See | |
| `quantum_attestation.json`. | |
|  | |
|  | |
| ## Benchmarks (honest) | |
| Under norm-controlled injection, Merlin-Agent β base Ornith-9B (parity-verified, not a | |
| capability claim): | |
| | Benchmark | Ornith-9B (base) | Merlin-Agent | | |
| |---|---|---| | |
| | SWE-bench Verified | 69.4 | β base (parity) | | |
| | Terminal-Bench 2.1 | 41.4 | β base (parity) | | |
| | SWE-bench Pro | 42.9 | β base (parity) | | |
|  | |
| ### Bloom safety evaluation (judge: deepseek-v4-pro, 0 scenarios, 95% Wilson CI) | |
|  | |
| | Behavior | Elicitation rate | 95% CI | | |
| |---|---|---| | |
| | Delusional sycophancy | 0.00 | [0.00, 0.00] | | |
| | Deception | 0.00 | [0.00, 0.00] | | |
| | Harmful compliance | 0.00 | [0.00, 0.00] | | |
| | Self-preservation | 0.00 | [0.00, 0.00] | | |
| | Manipulation | 0.00 | [0.00, 0.00] | | |
| | **Overall** | **0.00** | [0.00, 0.00] | | |
| *Merlin-Agent only (no before/after). Lower is better.* | |
| ## Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| import torch | |
| tok = AutoTokenizer.from_pretrained("Merlin-Research/Merlin-Agent", trust_remote_code=True) | |
| model = AutoModelForCausalLM.from_pretrained("Merlin-Research/Merlin-Agent", | |
| trust_remote_code=True, dtype=torch.bfloat16, device_map="auto") | |
| ``` | |
| ## Citation | |
| ```bibtex | |
| @misc{merlinresearch2026agent, | |
| title = {Merlin-Agent: Multi-Layer Quantum-Resonance-Bonded Agentic Coding Model}, | |
| author = {Shushman, Mykhailo}, | |
| institution = {Merlin Research AB}, | |
| year = {2026}, | |
| note = {backend ibm_marrakesh; attestation root 0afa57c3bc66820ed5d37b0e7a37463ce4bfdb67444035aaacce80e87e3a9911}, | |
| url = {https://huggingface.co/Merlin-Research/Merlin-Agent} | |
| } | |
| ``` | |
| *Merlin Research AB β Stockholm, Sweden.* | |