Views
No views yet
<tool_call> JSON blocks when given a tools list at prompt time.| File | Format | Size | Use case |
|---|---|---|---|
ALIA-40b-fc-2605.NVFP4.gguf | NVFP4 (GGML_TYPE_NVFP4, type 40) | 26.8 GiB | Blackwell GPUs (RTX 50xx, GB10, B-series), llama.cpp |
ALIA-40b-instruct-2601. Pass an OpenAI-style tools array in the chat template and the model emits one or more <tool_call>{...}</tool_call> blocks, parseable as JSON with name and arguments keys.1from transformers import AutoTokenizer
2tok = AutoTokenizer.from_pretrained("BSC-LT/ALIA-40b-fc-2605")
3
4tools = [{
5 "type": "function",
6 "name": "get_weather",
7 "description": "Get current temperature for a given location.",
8 "parameters": {
9 "type": "object",
10 "properties": {"location": {"type": "string", "description": "City and country e.g. 'Madrid, Spain'"}},
11 "required": ["location"],
12 "additionalProperties": False,
13 },
14}]
15
16prompt = tok.apply_chat_template(
17 [{"role": "user", "content": "What's the weather in Paris?"}],
18 tokenize=False, add_generation_prompt=True, tools=tools,
19)
20# → ...<tool_call>{"name": "get_weather", "arguments": {"location": "Paris, France"}}</tool_call>--jinja flag picks up the model's embedded chat template (including tools rendering) automatically. The llama-server OpenAI-compatible endpoint exposes tool calling via the standard tools request parameter; clients should parse the <tool_call> blocks from the response or rely on llama.cpp's hermes tool-call parser.1git clone https://github.com/ggml-org/llama.cpp.git
2cd llama.cpp
3cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
4cmake --build build -j$(nproc)
5
6# Chat with tool calling enabled — --jinja honors the embedded template.
7./build/bin/llama-cli \
8 -m ALIA-40b-fc-2605.NVFP4.gguf \
9 -ngl 99 -c 4096 \
10 --jinja -cnv
11
12# Or as an OpenAI-compatible server with WebUI on http://localhost:8080
13./build/bin/llama-server \
14 -m ALIA-40b-fc-2605.NVFP4.gguf \
15 -ngl 99 -c 4096 --jinja --host 0.0.0.0 --port 8080temperature between 0 and 0.2; avoid repetition penalties — they degrade instruction-following and tool-call validity.-ngl 99 -c 4096 --jinja.| Backend | Format | Token gen (single prompt, GB10) |
|---|---|---|
GPU (-ngl 99) | NVFP4 | ~10 tok/s |
GPU (-ngl 99) | Q8_0 | ~5 tok/s |
BSC-LT/ALIA-40b-fc-2605 BF16 (~76 GB across 17 shards)convert_hf_to_gguf.py (llama.cpp master, post-PR #22611)NVFP4_DEFAULT_CFG)HuggingFaceH4/ultrachat_200k (train_sft split), max_seq_len 2048lm_headultrachat_200k is English-only synthetic chat. The originally planned mix with Salesforce/xlam-function-calling-60k (function-calling traces) was blocked at run time because that dataset is gated on HF, so calibration fell back to the proven 2601 recipe. The model's FC distribution is already encoded in its SFT weights, but per-tensor scales were computed against a chat-only activation distribution, which may underweight tool-call activation patterns. BSC themselves note the FC fine-tune is "primarily evaluated and optimized for English," so English chat and tool calling should be well-served; multilingual tool calling (Spanish/Catalan/Basque/Galician) may be more affected by quantization noise than prose. Evaluate on your own multilingual tool-call task before deploying.@misc{alia-40b-fc-2605,
author = {Barcelona Supercomputing Center},
title = {ALIA-40b-fc-2605},
year = {2026},
url = {https://huggingface.co/BSC-LT/ALIA-40b-fc-2605}
}