Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

TICO — Torch IR to Circle

TICO (Torch IR to Circle ONE) is a Python library that converts PyTorch modules into Circle models — a lightweight and efficient representation in ONE designed for optimized on-device neural network inference.

Highlights

  • One-call conversiontico.convert() turns an nn.Module into a ready-to-deploy .circle binary.
  • .pt2 support — convert saved torch.export programs via the Python API or the pt2-to-circle command-line tool.
  • Run Circle models in Python — execute converted models directly for quick parity checks against PyTorch.
  • Quantization toolkit — a unified prepare/convert API with GPTQ, PTQ (WrapQ), SmoothQuant, SpinQuant, and CLE, plus config-driven CLI recipes for LLMs and VLMs.

Installation

Prerequisites

  • Python 3.10+
  • (Optional) one-compiler — only required to run inference with converted Circle models. Conversion itself does not need it.

We highly recommend using a virtual environment (e.g., conda, venv).

From PyPI

pip install tico

From source

git clone https://github.com/Samsung/TICO.git
cd TICO

./ccex build     # generates build/ and dist/
./ccex install   # installs the package

./ccex install options

Option Description
--dist Install from the built wheel (default is editable mode)
--torch_ver <ver> Torch version to install: a family (2.5 ~ 2.10), an exact version (e.g. 2.7.0+cu118), or nightly. Default: 2.7
--cuda_ver <maj.min> Override the detected CUDA version (e.g. 12.1)
--cpu_only Force a CPU-only Torch installation

Quick start

import tico
import torch

class AddModule(torch.nn.Module):
    def forward(self, x, y):
        return x + y

torch_module = AddModule()
example_inputs = (torch.ones(4), torch.ones(4))

circle_model = tico.convert(torch_module.eval(), example_inputs)
circle_model.save('add.circle')

[!NOTE] Call eval() on the module before conversion. TICO internally uses torch.export, so the module must be export-able.

Converting a saved .pt2 file from the command line:

pt2-to-circle -i add.pt2 -o add.circle

See the Getting Started guide for compile configurations, .pt2 conversion, and running Circle models directly in Python.

Quantization

The tico.quantization module provides a unified, modular interface for quantizing neural networks — including large language models — through a simple two-step prepareconvert workflow:

from tico.quantization import prepare, convert
from tico.quantization.config.gptq import GPTQConfig

prepared_model = prepare(model.eval(), GPTQConfig())

for d in dataset:          # calibration
    prepared_model(d)

quantized_model = convert(prepared_model, GPTQConfig())

Documentation

For users

Document Description
Getting Started Converting modules and .pt2 files, compile configuration, running Circle models in Python
Quantization The prepare/convert quantization API and toolkit
Quantization examples Command-line quantization, evaluation, and debugging workflows

For developers

Document Description
Development guide Environment setup, testing, and code formatting with ./ccex
System design Architecture, pass pipeline, invariants, and behavior design
Requirements Functional and non-functional requirements
System tests System-level test coverage

Contributing

Contributions are welcome! For quantization algorithms, start with the quantization contribution guide and the recipes developer guide. Before submitting a PR, set up the development environment and run the tests and formatter as described in the development guide.

License

Licensed under the Apache License 2.0 — see LICENSE.

Release files for tico 0.2.0.dev260707

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

Source distribution (sdist)

Source distribution for tico 0.2.0.dev260707
File Size Uploaded
tico-0.2.0.dev260707.tar.gz 569.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tico 0.2.0.dev260707
File Interpreter ABI Platform
tico-0.2.0.dev260707-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / tico-0.2.0.dev260707.tar.gz

Download URL tico-0.2.0.dev260707.tar.gz
Size 569.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c1e75a33732cecbf2e040bd51f6fff3967620e10656d1b484c246bdcd0c1299c
BLAKE2b-256 checksum
How to use checksums
5727f8f84351dba9ca2386dc97f2dc84abb7c88601926ac80e3b271cf3531bf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / tico-0.2.0.dev260707-py3-none-any.whl

Download URL tico-0.2.0.dev260707-py3-none-any.whl
Size 960.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
445cf53dba8332119b6ac7566d65d5b784e7822490286aed0a7f968ab8f510ed
BLAKE2b-256 checksum
How to use checksums
6de5ca169001273ad8d90c94580969c59b82698390a5c4a1b4c508d3f6d805c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

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