b8634
chat : add Granite 4.0 chat template with correct tool_call role mapping ( #20804 ) chat : add Granite 4.0 chat template with correct tool_call role mapping Introduce LLM_CHAT_TEMPLATE_GRANITE_4_0 alongside the existing Granite 3.x template (renamed LLM_CHAT_TEMPLATE_GRANITE_3_X ). The Granite 4.0 Jinja template uses XML tags and maps the assistant_tool_call role to assistant . Without a matching C++ handler, the fallback path emits the literal role assistant_tool_call which the model does not recognize, breaking tool calling when --jinja is not used. Changes: Rename LLM_CHAT_TEMPLATE_GRANITE to LLM_CHAT_TEMPLATE_GRANITE_3_X (preserves existing 3.x behavior unchanged) Add LLM_CHAT_TEMPLATE_GRANITE_4_0 enum, map entry, and handler Detection: + ( or ) → 4.0, otherwise → 3.x Add production Gr
chat : add Granite 4.0 chat template with correct tool_call role mapping (#20804)
- chat : add Granite 4.0 chat template with correct tool_call role mapping
Introduce LLM_CHAT_TEMPLATE_GRANITE_4_0 alongside the existing Granite 3.x template (renamed LLM_CHAT_TEMPLATE_GRANITE_3_X).
The Granite 4.0 Jinja template uses XML tags and maps the assistant_tool_call role to <|start_of_role|>assistant<|end_of_role|><|tool_call|>. Without a matching C++ handler, the fallback path emits the literal role assistant_tool_call which the model does not recognize, breaking tool calling when --jinja is not used.
Changes:
-
Rename LLM_CHAT_TEMPLATE_GRANITE to LLM_CHAT_TEMPLATE_GRANITE_3_X (preserves existing 3.x behavior unchanged)
-
Add LLM_CHAT_TEMPLATE_GRANITE_4_0 enum, map entry, and handler
-
Detection: <|start_of_role|> + ( or ) → 4.0, otherwise → 3.x
-
Add production Granite 4.0 Jinja template
-
Add tests for both 3.x and 4.0 template paths (C++ and Jinja)
Co-Authored-By: Claude Opus 4.6 [email protected]
-
Code review: follow standard format and use common logic in test-chat-template.cpp
-
Rename custom_conversation variable for extra_conversation to give it a more meaningful name
Co-authored-by: Claude Opus 4.6 [email protected]
macOS/iOS:
-
macOS Apple Silicon (arm64)
-
macOS Intel (x64)
-
iOS XCFramework
Linux:
-
Ubuntu x64 (CPU)
-
Ubuntu arm64 (CPU)
-
Ubuntu s390x (CPU)
-
Ubuntu x64 (Vulkan)
-
Ubuntu arm64 (Vulkan)
-
Ubuntu x64 (ROCm 7.2)
-
Ubuntu x64 (OpenVINO)
Windows:
-
Windows x64 (CPU)
-
Windows arm64 (CPU)
-
Windows x64 (CUDA 12) - CUDA 12.4 DLLs
-
Windows x64 (CUDA 13) - CUDA 13.1 DLLs
-
Windows x64 (Vulkan)
-
Windows x64 (SYCL)
-
Windows x64 (HIP)
openEuler:
-
openEuler x86 (310p)
-
openEuler x86 (910b, ACL Graph)
-
openEuler aarch64 (310p)
-
openEuler aarch64 (910b, ACL Graph)
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
claudemodelproduct
PATHFINDER: Multi-objective discovery in structural and spectral spaces
arXiv:2604.04194v1 Announce Type: cross Abstract: Automated decision-making is becoming key for automated characterization including electron and scanning probe microscopies and nano indentation. Most machine learning driven workflows optimize a single predefined objective and tend to converge prematurely on familiar responses, overlooking rare but scientifically important states. More broadly, the challenge is not only where to measure next, but how to coordinate exploration across structural, spectral, and measurement spaces under finite experimental budgets while balancing target-driven optimization with novelty discovery. Here we introduce PATHFINDER, a framework for autonomous microscopy that combines novelty driven exploration with optimization, helping the system discover more diver

Enhancing 6G Wireless Intelligence: Do LLMs Work for CSI Prediction?
arXiv:2604.04028v1 Announce Type: new Abstract: In high-mobility 6G scenarios, rapidly time-varying channels lead to very short coherence times, which makes conventional pilot-based channel state information (CSI) estimation approaches prone to outdated information or excessive pilot overhead. Therefore, channel prediction becomes essential in such dynamic wireless systems. To address this challenge, large language models (LLMs) are emerging learning frameworks that have recently attracted attention for CSI prediction due to their strong sequence modeling capability and ability to generalize across different environments. This paper proposes an LLM-based framework for channel prediction in high-mobility orthogonal time frequency space (OTFS) communication systems. In this work, we develop

LLM-Agent-based Social Simulation for Attitude Diffusion
arXiv:2604.03898v1 Announce Type: new Abstract: This paper introduces discourse_simulator, an open-source framework that combines LLMs with agent-based modelling. It offers a new way to simulate how public attitudes toward immigration change over time in response to salient events like protests, controversies, or policy debates. Large language models (LLMs) are used to generate social media posts, interpret opinions, and model how ideas spread through social networks. Unlike traditional agent-based models that rely on fixed, rule-based opinion updates and cannot generate natural language or consider current events, this approach integrates multidimensional sociological belief structures and real-world event timelines. This framework is wrapped into an open-source Python package that integr
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Products

Element-based Formation Control: a Unified Perspective from Continuum Mechanics
arXiv:2604.04027v1 Announce Type: cross Abstract: This paper establishes a unified element-based framework for formation control by introducing the concept of the deformation gradient from continuum mechanics. Unlike traditional methods that rely on geometric constraints defined on graph edges, we model the formation as a discrete elastic body composed of simplicial elements. By defining a generalized distortion energy based on the local deformation gradient tensor, we derive a family of distributed control laws that can enforce various geometric invariances, including translation, rotation, scaling, and affine transformations. The convergence properties and the features of the proposed controllers are analyzed in detail. Theoretically, we show that the proposed framework serves as a bridg

Ledger-State Stigmergy: A Formal Framework for Indirect Coordination Grounded in Distributed Ledger State
arXiv:2604.03997v1 Announce Type: cross Abstract: Autonomous software agents on blockchains solve distributed-coordination problems by reading shared ledger state instead of exchanging direct messages. Liquidation keepers, arbitrage bots, and other autonomous on-chain agents watch balances, contract storage, and event logs; when conditions change, they act. The ledger therefore functions as a replicated shared-state medium through which decentralized agents coordinate indirectly. This form of indirect coordination mirrors what Grass\'e called stigmergy in 1959: organisms coordinating through traces left in a shared environment, with no central plan. Stigmergy has mature formalizations in swarm intelligence and multi-agent systems, and on-chain agents already behave stigmergically in practi

Diffusion Path Alignment for Long-Range Motion Generation and Domain Transitions
arXiv:2604.03310v1 Announce Type: new Abstract: Long-range human movement generation remains a central challenge in computer vision and graphics. Generating coherent transitions across semantically distinct motion domains remains largely unexplored. This capability is particularly important for applications such as dance choreography, where movements must fluidly transition across diverse stylistic and semantic motifs. We propose a simple and effective inference-time optimization framework inspired by diffusion-based stochastic optimal control. Specifically, a control-energy objective that explicitly regularizes the transition trajectories of a pretrained diffusion model. We show that optimizing this objective at inference time yields transitions with fidelity and temporal coherence. This

DC-Ada: Reward-Only Decentralized Observation-Interface Adaptation for Heterogeneous Multi-Robot Teams
arXiv:2604.03905v1 Announce Type: new Abstract: Heterogeneity is a defining feature of deployed multi-robot teams: platforms often differ in sensing modalities, ranges, fields of view, and failure patterns. Controllers trained under nominal sensing can degrade sharply when deployed on robots with missing or mismatched sensors, even when the task and action interface are unchanged. We present DC-Ada, a reward-only decentralized adaptation method that keeps a pretrained shared policy frozen and instead adapts compact per-robot observation transforms to map heterogeneous sensing into a fixed inference interface. DC-Ada is gradient-free and communication-minimal: it uses budgeted accept/reject random search with short common-random-number rollouts under a strict step budget. We evaluate DC-Ada

Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!