--- name: freetoken-dankclaw-build description: "Build FreeToken on Dankclaw (Dankware) — installs CUDA toolkit, sets CUDA_HOME, handles nvcc/CUDA version mismatch" --- ## Build FreeToken on Dankclaw ### Prerequisites - CUDA toolkit: `sudo apt install nvidia-cuda-toolkit` (gives nvcc at /usr/bin, libcudart at /usr/lib/x86_64-linux-gnu/) - uv: installed at /home/dank/.local/bin/uv (or install via `curl -LsSf https://astral.sh/uv/install.sh | sh`) - CMake, git, Python >= 3.10 — all present ### Build steps ```bash cd /home/dank git clone https://github.com/FlashML-org/FreeToken.git # or cd into existing cd FreeToken uv venv && source .venv/bin/activate export CUDA_HOME=/usr export FREETOKEN_ALLOW_CUDA_MISMATCH=1 # nvcc 12.4 + torch cu130 is safe uv pip install -e ".[accel]" ``` ### Verification ```bash ft --version python3 -c " from freetoken.checkpoint import ftw import torch t = torch.randn(3,4,dtype=torch.float16) print(ftw._dtype_str(t.dtype), ftw._elsize(t.dtype)) " ``` ### Key notes - FTW format is dtype-agnostic: FP16, BF16 (default), FP32, FP8 all work - GGUF support: only Gemma4GGUFForCausalLM - GGML types: F32/F16/BF16 (native views), Q4_0/Q6_K (dequant), Q8_0 (listed, no dequant) - The NVIDIA driver modules may not be loaded at build time (NVML warning) — not a problem for the build itself