Skip to main content

TACHY-Compiler

TACHY-Compiler is a comprehensive deep learning compiler and platform conversion framework developed by Deeper-I. It is designed to bridge the gap between popular deep learning frameworks (like PyTorch) and the TACHY hardware accelerator runtime environment.

This compiler handles model parsing, optimization, tensor alignment, and binary generation. It robustly supports large-scale models, complex operators, and dual-checkpoint pipelines out of the box.

Key Features

  • PyTorch to ONNX to TACHY: Seamless end-to-end compilation pipeline.
  • Dual Checkpoint Compilation (compile-dual): Officially supports simultaneous parsing and compilation of Reference (eval / pre) and Target (comp / opt) checkpoints into a unified output structure.
  • Large Model Support: Built-in mechanisms to handle models larger than the Protobuf 2GB limit using external_data mapping.
  • Robust ONNX Versioning: Automatically utilizes ONNX Opset 18 for stability, equipped with automatic version conversion and fallback mechanisms to mitigate onnxscript conversion issues.
  • MCP Server Integrated: Exposes tools to LLMs and agentic frameworks via the Model Context Protocol (MCP) using FastMCP.
  • Dynamic Binary Resolution: Intelligently locates dependency binaries utilizing environment variables (TACHY_UTIL_PATH) and relative package paths.

Installation

You can install TACHY-Compiler directly via PyPI:

pip install TACHY-Compiler

Requirements

  • Python >= 3.8
  • numpy, networkx, onnx, commentjson, ordered-set, easydict, DDesignerAPI
  • (Optional) torch if utilizing the PyTorch to ONNX conversion pipeline.

CLI Usage

TACHY-Compiler provides a simple, unified command-line interface under the tachy command.

1. Dual Checkpoint Compilation

Best for executing the full compilation pipeline for two checkpoints (e.g. eval and comp) simultaneously. Intermediate files are automatically managed and cleaned up if requested.

tachy compile-dual \
    --eval_model ./eval_model.pth \
    --comp_model ./comp_model.pth \
    --input_shape "[1,3,224,224]" \
    --output_dir ./dual_output \
    --cleanup

Outputs will be cleanly structured into ./dual_output/final_binaries/eval/ and ./dual_output/final_binaries/comp/.

2. Single Model Pipeline Steps

If you need granular control, you can execute the pipeline steps individually.

Convert PyTorch to ONNX

tachy convert-pt2onnx ./model.pth ./model.onnx "[1,3,224,224]" False

Convert ONNX to TACHY Format

tachy convert-onnx ./model.onnx ./model.json

Compile TACHY JSON to Runtime Binaries

tachy compile ./model.json ./output_bin_dir

3. Model Context Protocol (MCP) Server

You can spin up the built-in MCP server to allow LLMs and AI Agents to compile models on your behalf.

tachy mcp

Environment Variables

  • TACHY_UTIL_PATH (Optional): An absolute path to the directory containing external utility binaries (fc.out, block_4bit.out). If not set, the compiler will intelligently look for the optional directory within the installed package.

License

This project is licensed under the BSD-3-Clause License. See the LICENSE file for details.

Release files for TACHY-Compiler 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TACHY-Compiler 0.1.1
File Size Uploaded
tachy_compiler-0.1.1.tar.gz 61.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TACHY-Compiler 0.1.1
File Interpreter ABI Platform
tachy_compiler-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 139.3 kB

Release files / tachy_compiler-0.1.1.tar.gz

Download URL tachy_compiler-0.1.1.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cc103c7d4fd0d0fb42fd6940af0162f5f329b5d2d75fd6f38127ec1dcf7471cd
BLAKE2b-256 checksum
How to use checksums
0b1911da330c4d42e7ec4e6d786134a48e16b6e094bed5048ec0c5e4575457d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release files / tachy_compiler-0.1.1-py3-none-any.whl

Download URL tachy_compiler-0.1.1-py3-none-any.whl
Size 78.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68aab48d3a485e6886961bc2cb8c1c2db74fec3a843f5b93ac7bc652d231340c
BLAKE2b-256 checksum
How to use checksums
c1b0b9e8969e3ed16b6cfafdc5b4815f05fb7df61783d969a65a3485318aabae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release history Release notifications | RSS feed

0.1.3

1 release file

0.1.2

1 release file

This release

0.1.1 This release

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page