Skip to content

Installation

The LatticeLabs Toolkit is a monorepo. You can install everything at once through the conda environment, or install individual packages with pip.

  • Python 3.9 – 3.12
  • Conda (Miniconda or Miniforge recommended)

macOS-critical: install PyTorch via conda-forge

Section titled “macOS-critical: install PyTorch via conda-forge”
Terminal window
# Clone the repository
git clone https://github.com/LatticeLabsAI/ll_toolkit.git
cd ll_toolkit
# Create the conda environment (installs PyTorch, pythonocc, and all packages)
conda env create -f environment.yml
conda activate cadling

The environment installs cadling, ll_stepnet, and geotoken as editable packages.

Each package is independently installable with pip (run after activating the conda environment so PyTorch is already present):

Terminal window
pip install -e ./cadling # CAD document processing
pip install -e ./ll_stepnet # STEP/BRep neural networks
pip install -e ./geotoken # Geometric tokenizer
pip install -e ./ll_ocadr # Optical CAD recognition
pip install -e ./ll_gen # Generation orchestration
pip install -e ./ll_clouds # Point-cloud processing

The root pyproject.toml defines extras you can install on top of the base packages:

Terminal window
pip install -e ".[dev]" # Testing, linting, docs
pip install -e ".[cad]" # CAD processing (trimesh, networkx, numpy-stl)
pip install -e ".[ml]" # ML (transformers, accelerate, einops)
pip install -e ".[vision]" # Vision (opencv, easyocr, matplotlib)
pip install -e ".[hub]" # HuggingFace Hub integration
pip install -e ".[drawings]" # 2D drawings (DXF, PDF)
pip install -e ".[all]" # Everything

The neural models also train and run natively in MLX on Apple Silicon (M-series). Each package’s mlx/ trainers convert the real PyTorch checkpoints and verify parity, or train from scratch — see each package’s Usage page.

Terminal window
pip install mlx mlx-lm # in the conda env; mlx-lm is used by ll_ocadr's LLM splice

The OCC kernel (pythonocc-core) is still required for the generation packages, since validity is measured by executing generated programs through the real kernel.

Continue to the Quickstart for a first end-to-end run, or jump to any package’s Overview from the sidebar.