Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 1.82 KB

File metadata and controls

71 lines (55 loc) · 1.82 KB

CRAYON Installation Guide

Quick Installation

Option 1: Install from PyPI (Recommended)

pip install xerv-crayon

Option 2: If PyPI Installation Fails

Method A: Force Wheel Installation

pip install --only-binary=:all: xerv-crayon

Method B: Install from GitHub (Latest)

pip install git+https://github.com/Electroiscoding/CRAYON.git

Method C: Manual Build (Advanced)

git clone https://github.com/Electroiscoding/CRAYON.git
cd CRAYON
pip install -e .

Troubleshooting

If you get build errors:

  1. Install Visual Studio Build Tools (Windows):

  2. Install CUDA Toolkit (for GPU support):

  3. Force CPU-only installation:

    set CRAYON_FORCE_CPU=1
    pip install xerv-crayon

Python Version Requirements

  • Minimum: Python 3.8
  • Recommended: Python 3.10+
  • Tested: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13

Quick Test

from crayon import CrayonVocab

# Auto-detects hardware (CUDA if available, else CPU)
tokenizer = CrayonVocab(device="auto")
tokenizer.load_profile("standard")
tokens = tokenizer.tokenize("Hello, world!")
print(f"Device: {tokenizer.device}")
print(f"Tokens: {tokens}")

Features

  • Automatic Hardware Detection: CUDA, ROCm, or CPU
  • Seamless Fallback: CPU if GPU unavailable
  • Detailed Error Messages: Actionable debugging info
  • Cross-Platform: Windows, Linux, macOS
  • Multiple Python Versions: 3.8+ support
  • High Performance: AVX2/AVX-512 CPU, GPU acceleration