Building Guide
Prerequisites
Installing Prerequisites
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install protoc
brew install protobufDevelopment Setup
Building the CLI Tool
Step-by-Step: Building an Encoderfile
Step 1: Prepare Your Model
Option A: Export a Model to ONNX
Option B: Use a Pre-Exported Model
Verify Model Structure
Step 2: Create Configuration File
Step 3: Build the Encoderfile
Step 4: Test Your Encoderfile
Configuration Options
Model Types
Embedding Models
Sequence Classification Models
Token Classification Models
Advanced Features
Cross-compilation
Lua Transforms
Custom Cache Directory
Troubleshooting
Error: "No such file: model.onnx"
Error: "Could not locate model config at path"
Error: "cargo build failed"
Build is very slow
CI/CD Integration
GitHub Actions Example
Binary Distribution
Next Steps
Last updated