ruvllm-cli-2.2.0 is not a library.
RuvLLM CLI
Command-line interface for RuvLLM inference, optimized for Apple Silicon.
Installation
# From crates.io
# From source (with Metal acceleration)
Commands
Download Models
Download models from HuggingFace Hub:
# Download Qwen with Q4K quantization (default)
# Download with specific quantization
# Force re-download
# Download specific revision
Model Aliases
| Alias | Model ID |
|---|---|
qwen |
Qwen/Qwen2.5-7B-Instruct |
mistral |
mistralai/Mistral-7B-Instruct-v0.3 |
phi |
microsoft/Phi-3-medium-4k-instruct |
llama |
meta-llama/Meta-Llama-3.1-8B-Instruct |
Quantization Options
| Option | Description | Memory Savings |
|---|---|---|
q4k |
4-bit quantization (default) | ~75% |
q8 |
8-bit quantization | ~50% |
f16 |
Half precision | ~50% |
none |
Full precision | 0% |
List Models
# List all available models
# List only downloaded models
# Detailed listing with sizes
Model Information
# Show model details
# Output includes:
# - Model architecture
# - Parameter count
# - Download status
# - Disk usage
# - Supported features
Interactive Chat
# Start chat with default settings
# With custom system prompt
# Adjust generation parameters
# Use specific quantization
Chat Commands
During chat, use these commands:
| Command | Description |
|---|---|
/help |
Show available commands |
/clear |
Clear conversation history |
/system <prompt> |
Change system prompt |
/temp <value> |
Change temperature |
/quit or /exit |
Exit chat |
Start Server
OpenAI-compatible inference server:
# Start with defaults
# Custom host and port
# Configure concurrency
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions |
POST | Chat completions |
/v1/completions |
POST | Text completions |
/v1/models |
GET | List models |
/health |
GET | Health check |
Example Request
Run Benchmarks
# Basic benchmark
# Configure benchmark
# Output formats
Benchmark Metrics
- Prefill Latency: Time to process input prompt
- Decode Throughput: Tokens per second during generation
- Time to First Token (TTFT): Latency before first output token
- Memory Usage: Peak GPU/RAM consumption
Global Options
# Enable verbose logging
# Disable colored output
# Custom cache directory
# Or via environment variable
Configuration
Cache Directory
Models are cached in:
- macOS:
~/Library/Caches/ruvllm - Linux:
~/.cache/ruvllm - Windows:
%LOCALAPPDATA%\ruvllm
Override with --cache-dir or RUVLLM_CACHE_DIR.
Logging
Set log level with RUST_LOG:
RUST_LOG=debug
RUST_LOG=ruvllm=trace
Examples
Basic Workflow
# 1. Download a model
# 2. Verify it's downloaded
# 3. Start chatting
Server Deployment
# Download model first
# Start server with production settings
Performance Testing
# Run comprehensive benchmarks
Troubleshooting
Out of Memory
# Use smaller quantization
# Or reduce context length
Slow Download
# Resume interrupted download
# Force fresh download
Metal Issues (macOS)
Ensure Metal is available:
# Check Metal device
|
# Try with CPU fallback
RUVLLM_NO_METAL=1
Feature Flags
Build with specific features:
# Metal acceleration (macOS)
# CUDA acceleration (NVIDIA)
# Both (if available)
License
Apache-2.0 / MIT dual license.