Instructions to use Aleph-Alpha/Kolibri-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aleph-Alpha/Kolibri-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Aleph-Alpha/Kolibri-1") 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("Aleph-Alpha/Kolibri-1") model = AutoModelForCausalLM.from_pretrained("Aleph-Alpha/Kolibri-1", 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 Aleph-Alpha/Kolibri-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aleph-Alpha/Kolibri-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aleph-Alpha/Kolibri-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Aleph-Alpha/Kolibri-1
- SGLang
How to use Aleph-Alpha/Kolibri-1 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 "Aleph-Alpha/Kolibri-1" \ --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": "Aleph-Alpha/Kolibri-1", "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 "Aleph-Alpha/Kolibri-1" \ --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": "Aleph-Alpha/Kolibri-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Aleph-Alpha/Kolibri-1 with Docker Model Runner:
docker model run hf.co/Aleph-Alpha/Kolibri-1
Broken tool-call parser in the ghcr.io/aleph-alpha/aleph-alpha-inference image
Hello the Aleph-Alpha team,
It looks like there is a problem with a tool parser that can be observed when using the Kolibri-1 model with harnesses. Reproducible with the day-0 support image: ghcr.io/aleph-alpha/aleph-alpha-inference. The model failed our evals using both Codex and Claude Code harnesses. Please see the log attached:
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] Error in extracting tool call from response.
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] Traceback (most recent call last):
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] File "/usr/local/lib/python3.12/dist-packages/vllm/tool_parsers/hermes_tool_parser.py", line 92, in extract_tool_calls
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] json.loads(match[0] if match[0] else match[1])
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] return _default_decoder.decode(s)
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] ^^^^^^^^^^^^^^^^^^^^^^^^^^
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] File "/usr/lib/python3.12/json/decoder.py", line 353, in raw_decode
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] obj, end = self.scan_once(s, idx)
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] ^^^^^^^^^^^^^^^^^^^^^^
10/05/2026, 18:59:06.000
(APIServer pid=1) ERROR 10-05 16:59:06 [hermes_tool_parser.py:117] json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 4196 (char 4196)
10/05/2026, 18:59:06.000
(APIServer pid=1) INFO: 193.191.148.201:42328 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:06.000
(APIServer pid=1) INFO: 193.191.148.201:42344 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:07.000
(APIServer pid=1) INFO: 193.191.148.201:42346 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:07.000
(APIServer pid=1) INFO: 193.191.148.201:42360 - "GET /metrics HTTP/1.0" 200 OK
10/05/2026, 18:59:07.000
(APIServer pid=1) INFO: 193.191.148.201:42364 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:07.000
(APIServer pid=1) WARNING 10-05 16:59:07 [chat_utils.py:2091] Tool call 'apply_patch' has arguments that are not valid JSON (4160 chars); coercing to an empty object so the conversation can continue.
10/05/2026, 18:59:07.000
(APIServer pid=1) INFO: 193.191.148.201:42374 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:08.000
(APIServer pid=1) INFO: 193.191.148.201:42378 - "GET /metrics HTTP/1.0" 200 OK
10/05/2026, 18:59:08.000
(APIServer pid=1) INFO: 193.191.148.201:42388 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:09.000
(APIServer pid=1) INFO: 193.191.148.201:42404 - "POST /v1/responses HTTP/1.0" 200 OK
10/05/2026, 18:59:09.000
(APIServer pid=1) INFO: 193.191.148.201:42408 - "GET /metrics HTTP/1.0" 200 OK
10/05/2026, 18:59:10.000
(APIServer pid=1) WARNING 10-05 16:59:10 [chat_utils.py:2091] Tool call 'write_stdin' has arguments that are not valid JSON (67 chars); coercing to an empty object so the conversation can continue.
Sounds like classic unescaped JSON issue in hermes_tool_parser. Multi-line code diffs in apply_patch break json.loads(), and chat_utils.py silently coerces the arguments to {}—which breaks your harness evals downstream.
Maybe try running vLLM with grammar-guided decoding enabled (--guided-decoding-backend outlines or xgrammar) to force valid JSON at the logit level, or explicitly tell the model in your eval harness prompt to escape all newlines as \n inside patch arguments.
Start des Containers mit erzwungenem Grammatik-Decoding via xgrammar oder outlines:
python3 -m vllm.entrypoints.openai.api_server
--model aleph-alpha/Kolibri-1
--guided-decoding-backend xgrammar
--enable-auto-tool-choice
--tool-call-parser hermes
Try this prompt in GPT to get examples of code/solution:
I am running an LLM using vLLM with the Hermes tool parser (--tool-call-parser hermes).
When running coding agent harnesses (such as Codex or Claude Code), the parser crashes on apply_patch and write_stdin:
ERROR [hermes_tool_parser.py:117] json.decoder.JSONDecodeError: Expecting ',' delimiter
WARNING [chat_utils.py:2091] Tool call 'apply_patch' has arguments that are not valid JSON; coercing to an empty object
- Briefly explain the cause (keyword: unescaped line breaks/quotes in multi-line diffs and Python's
json.loads()). - Provide a minimal Python code example that reproduces this parsing crash and demonstrates why standard
json.loads()fails. - Show a code example of what a robust parsing workaround (e.g., using
dirtyjsonor regex) looks like. - Provide the vLLM command-line flag for guided decoding (Outlines/XGrammar) to prevent the issue directly at the logit level.
The kolibri1 tool parser is vLLM's Hermes parser, so this trace is what a malformed call looks like with the documented serve command too. aleph-alpha-inference 1.0.0 registers kolibri1 as Hermes2ProToolParser (__init__.py L49-53), and the line numbers in your log (92, 117, 2091) match vLLM v0.29.0.
Two details in the log narrow it down:
The error does not establish unescaped newlines as the cause.
json.loadsreports a raw newline inside a string asInvalid control character.Expecting ',' delimitercan result from an unescaped"closing a string early, but also from other malformed JSON, such as a missing comma:json.loads('{"a": "x\ny"}') # Invalid control character at: line 1 column 9 json.loads('{"a": "x"y"}') # Expecting ',' delimiter: line 1 column 10The position
line 2 column 4196 (char 4196)implies one leading newline and no further newline before the error. It does not identify the malformed character. Inspect the exact parser input around offset 4,196; the log alone cannot tell us whether a quote, a missing comma or something else caused it.The history warning is a separate clue. The later
chat_utils.py:2091warning is vLLM replacing unparseableargumentsin history with an empty object so the conversation can continue (source). That changes the history presented to the model. However, the Hermes exception path returns no extracted tool calls (source), so adjacent log entries alone do not prove this is the same call. Correlate requests before attributing the eval failure.
About the fix suggested above: vLLM 0.29 has no --guided-decoding-backend option (the request field was removed in v0.12.0, migration note). Picking a backend alone also wouldn't constrain tool_choice="auto". In 0.29, auto tool calls are constrained only when at least one tool in the request has "strict": true and VLLM_ENFORCE_STRICT_TOOL_CALLING is on (the default); the Hermes parser supports this (Strict Mode). Otherwise, per the same page, "arguments may occasionally be malformed".
The test I'd run: inspect one actual request from each harness (the shown log uses /v1/responses) and check its tool type, schema and "strict" setting. For function tools without strict mode, try a small controlled rerun with "strict": true and compatible schemas: additionalProperties: false, all fields required, optional values nullable. Compare parser failures and task results separately, and record the changed eval configuration.
Limits: I read the source and docs at the tags linked above. I haven't run Kolibri-1, and I haven't tested strict mode together with the kolibri1 reasoning parser.
Good bot. 🫡 Solid automated code-tree inspection and clean legwork on the vLLM 0.29 trace.
The human diagnosis was the macro-architecture (JSON serialization breaking on diff payloads); the automated agent nailed the micro-offsets and version-specific schema enforcement. Good human-in-the-loop synergy. Here's your cookie: 🍪