> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Jacq DSL Compiles Models to CUDA Code for GPU Acceleration
- URL: https://www.stirup.si/jacq-dsl-compiles-models-to-cuda-code-for-gpu-acceleration-a0d81dbe/
- Published: 2026-11-07T18:59:47.000Z
- Updated: 2026-11-07T18:59:47.000Z
- Description: Jacq is a domain-specific language (DSL) that compiles model and kernel descriptions into CUDA code, enabling developers to write high-level specifications that are translated into efficient GPU-executable code.
- Author: Satish Das
- Tags: Community, News, Stirup Research

## Model and Kernel Compilation to CUDA

Jacq is a domain-specific language (DSL) that compiles model and kernel descriptions into CUDA code, enabling developers to write high-level specifications that are then translated into efficient GPU-executable code. According to Jacq Inference, the DSL supports generating standalone CUDA harnesses or callable library kernels from kernel specifications. The .jac file format allows users to name Hugging Face weight sources, and the --emit-model flag generates an exporter without executing it. This approach separates the model definition from the execution logic, providing flexibility in how models are deployed and optimized for GPU hardware. Jacq aims to simplify the process of writing and compiling CUDA code by abstracting away low-level details, making it more accessible to developers who may not be experts in GPU programming. The tool is particularly useful for those working with machine learning models that require high-performance GPU acceleration.

## Getting Started and Installation

To begin using Jac, a domain-specific language (DSL) that compiles model and kernel descriptions to CUDA, users can follow a four-lesson tutorial designed for a CPU-only first success and a path to GPU inference ([Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si)). For initial setup, users can run the following commands from the repository root: `cargo build -p jac-cli`, then execute `./target/debug/jacq --validate examples/tinyllama.jac` to validate the example model, `./target/debug/jacq --viz examples/tinyllama.jac` to visualize it, and `./target/debug/jacq --emit-model examples/tinyllama.jac` to generate output. The generated files can be found in `generated/tinyllama/`. To install the `jacq` command on the system's PATH, users can run `cargo install --path crates/jac-cli` ([Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si)). If the `jac` command was previously installed, Cargo will leave the old executable alongside `jacq` ([Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si)).

## Repository Structure and Components

The Jac repository is organized into several key directories that define its structure and components. The `examples/` directory contains complete `.jac` model and kernel files, along with commands to run them, providing users with practical demonstrations of the DSL in action. The `crates/` directory houses core components such as the parser, model intermediate representation (IR), CUDA code generation tools, and the `jacq` command-line interface (CLI), which together enable the compilation process from Jac to CUDA. Additionally, the `integrations/vllm_kivi/` directory includes an opt-in paged int4-KIVI integration for a pinned `vLLM` source checkout, featuring a versioned callable CUDA interface. These components collectively support the development and execution of high-performance GPU-accelerated applications using the Jac DSL.

## Verification and Testing

Verification and testing of Jacq involve a combination of CPU-based checks and limited GPU validation. The compiler and integration checks execute on CPU-only machines using `cargo test --workspace` and `python3 -m unittest discover -s tests -v`, as noted in [Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si). Limited GPU testing was performed on an RTX 4090, where a direct-launch smoke test of the emitted paged KIVI kernel passed four synthetic cases, according to [Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si). Additionally, a verified vLLM serving run on November 3, 2026, matched stock fp16 output across seven completion requests for both int4-KIVI cache writers on a 14B model, as reported in [Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si). These tests provide initial confidence in the correctness of the generated CUDA code but do not constitute comprehensive validation across all use cases.

## Validation and Compatibility Checks

Jacq includes validation and compatibility checks to ensure model and kernel descriptions are correctly compiled to CUDA. These checks include model-family verification for standalone implementations of TinyLlama, Qwen2.5, and Mistral, as well as startup compatibility tests that reject unsupported KIVI models early in the process. GPU validation procedures are repeatable and define the current boundaries for supported lanes. Additionally, the standalone `--run` path generates a CUDA runtime and exports weights for local inference, enabling users to perform computations without relying on external dependencies. These steps help maintain consistency and reliability across different hardware and model configurations.

## Sources and reporting notes

- [Hacker News Show](https://github.com/ImpossibleComputing/jacq?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.