Text Generation
GGUF
Rust
English
ruvllm
agent-routing
claude-code
recursive-language-model
embeddings
llm-inference
sona
hnsw
simd
imatrix
conversational
Instructions to use ruv/ruvltra with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ruv/ruvltra with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ruv/ruvltra:Q4_K_M # Run inference directly in the terminal: llama cli -hf ruv/ruvltra:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ruv/ruvltra:Q4_K_M # Run inference directly in the terminal: llama cli -hf ruv/ruvltra:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf ruv/ruvltra:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf ruv/ruvltra:Q4_K_M
Use Docker
docker model run hf.co/ruv/ruvltra:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use ruv/ruvltra with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ruv/ruvltra" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ruv/ruvltra", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ruv/ruvltra:Q4_K_M
- Ollama
How to use ruv/ruvltra with Ollama:
ollama run hf.co/ruv/ruvltra:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use ruv/ruvltra with Docker Model Runner:
docker model run hf.co/ruv/ruvltra:Q4_K_M
- Lemonade
How to use ruv/ruvltra with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ruv/ruvltra:Q4_K_M
Run and chat with the model
lemonade run user.ruvltra-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update model card for v2.4 Ecosystem Edition with 100% routing accuracy
Browse files
README.md
CHANGED
|
@@ -24,6 +24,7 @@ tags:
|
|
| 24 |
- sota
|
| 25 |
- task-routing
|
| 26 |
- semantic-search
|
|
|
|
| 27 |
library_name: ruvllm
|
| 28 |
pipeline_tag: text-classification
|
| 29 |
base_model: Qwen/Qwen2.5-0.5B-Instruct
|
|
@@ -59,7 +60,7 @@ widget:
|
|
| 59 |
example_title: Architecture Task
|
| 60 |
---
|
| 61 |
|
| 62 |
-
# RuvLTRA
|
| 63 |
|
| 64 |
<p align="center">
|
| 65 |
<img src="https://img.shields.io/badge/Hybrid_Routing-100%25-brightgreen" alt="Hybrid Accuracy">
|
|
@@ -68,11 +69,20 @@ widget:
|
|
| 68 |
<img src="https://img.shields.io/badge/Latency-<10ms-orange" alt="Latency">
|
| 69 |
<img src="https://img.shields.io/badge/Capabilities-388-cyan" alt="Capabilities">
|
| 70 |
<img src="https://img.shields.io/badge/License-Apache%202.0-green" alt="License">
|
|
|
|
| 71 |
</p>
|
| 72 |
|
| 73 |
-
**RuvLTRA** is a collection of optimized models designed for **local routing, embeddings, and task classification** in Claude Code workflows
|
| 74 |
|
| 75 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
> **Benchmark Note:** HumanEval/MBPP don't apply here. RuvLTRA isn't designed to compete with Claude for code generation from scratch.
|
| 78 |
|
|
@@ -80,18 +90,18 @@ widget:
|
|
| 80 |
|
| 81 |
| Task | RuvLTRA | Claude API |
|
| 82 |
|------|---------|------------|
|
| 83 |
-
| Route task to correct agent |
|
| 84 |
-
| Generate embeddings for HNSW |
|
| 85 |
-
| Quick classification/routing |
|
| 86 |
-
| Memory retrieval scoring |
|
| 87 |
-
| Complex code generation |
|
| 88 |
-
| Multi-step reasoning |
|
| 89 |
|
| 90 |
---
|
| 91 |
|
| 92 |
-
##
|
| 93 |
|
| 94 |
-
Using **hybrid keyword+embedding strategy** plus **contrastive fine-tuning**, RuvLTRA
|
| 95 |
|
| 96 |
### SOTA Benchmark Results
|
| 97 |
|
|
@@ -108,15 +118,16 @@ Using **hybrid keyword+embedding strategy** plus **contrastive fine-tuning**, Ru
|
|
| 108 |
| Embedding Only | 88.2% | 40.0% | +48.2 pts |
|
| 109 |
| **Keyword-First Hybrid** | **100.0%** | 95.0% | +5 pts |
|
| 110 |
|
| 111 |
-
###
|
| 112 |
|
| 113 |
-
|
| 114 |
-
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
| 120 |
|
| 121 |
### Ecosystem Coverage (v2.4)
|
| 122 |
|
|
@@ -126,39 +137,9 @@ Using **hybrid keyword+embedding strategy** plus **contrastive fine-tuning**, Ru
|
|
| 126 |
| **agentic-flow** | 17 commands | 33 types | 32 MCP tools, 9 RL algorithms |
|
| 127 |
| **ruvector** | 6 CLI, 22 Rust crates | 12 NPM | 6 attention, 4 graph algorithms |
|
| 128 |
|
| 129 |
-
### Supported Agent Types (58+)
|
| 130 |
-
|
| 131 |
-
| Agent | Keywords | Use Cases |
|
| 132 |
-
|-------|----------|-----------|
|
| 133 |
-
| `coder` | implement, build, create | Code implementation |
|
| 134 |
-
| `researcher` | research, investigate, explore | Information gathering |
|
| 135 |
-
| `reviewer` | review, pull request, quality | Code review |
|
| 136 |
-
| `tester` | test, unit, integration | Testing |
|
| 137 |
-
| `architect` | design, architecture, schema | System design |
|
| 138 |
-
| `security-architect` | security, vulnerability, xss | Security analysis |
|
| 139 |
-
| `debugger` | debug, fix, bug, error | Bug fixing |
|
| 140 |
-
| `documenter` | jsdoc, comment, readme | Documentation |
|
| 141 |
-
| `refactorer` | refactor, async/await | Code refactoring |
|
| 142 |
-
| `optimizer` | optimize, cache, performance | Performance |
|
| 143 |
-
| `devops` | deploy, ci/cd, kubernetes | DevOps |
|
| 144 |
-
| `api-docs` | openapi, swagger, api spec | API documentation |
|
| 145 |
-
| `planner` | sprint, plan, roadmap | Project planning |
|
| 146 |
-
|
| 147 |
-
### Extended Capabilities (v2.4)
|
| 148 |
-
|
| 149 |
-
| Category | Examples |
|
| 150 |
-
|----------|----------|
|
| 151 |
-
| **MCP Tools** | memory_store, agent_spawn, swarm_init, hooks_pre-task |
|
| 152 |
-
| **Swarm Topologies** | hierarchical, mesh, ring, star, adaptive |
|
| 153 |
-
| **Consensus** | byzantine, raft, gossip, crdt, quorum |
|
| 154 |
-
| **Learning** | SONA train, LoRA finetune, EWC++ consolidate, GRPO optimize |
|
| 155 |
-
| **Attention** | flash, multi-head, linear, hyperbolic, MoE |
|
| 156 |
-
| **Graph** | mincut, GNN embed, spectral, pagerank |
|
| 157 |
-
| **Hardware** | Metal GPU, NEON SIMD, ANE neural engine |
|
| 158 |
-
|
| 159 |
---
|
| 160 |
|
| 161 |
-
##
|
| 162 |
|
| 163 |
| Operation | Claude API | RuvLTRA Local | Savings |
|
| 164 |
|-----------|------------|---------------|---------|
|
|
@@ -170,7 +151,7 @@ Using **hybrid keyword+embedding strategy** plus **contrastive fine-tuning**, Ru
|
|
| 170 |
|
| 171 |
---
|
| 172 |
|
| 173 |
-
##
|
| 174 |
|
| 175 |
| Model | Size | RAM | Latency |
|
| 176 |
|-------|------|-----|---------|
|
|
@@ -180,14 +161,30 @@ Using **hybrid keyword+embedding strategy** plus **contrastive fine-tuning**, Ru
|
|
| 180 |
|
| 181 |
---
|
| 182 |
|
| 183 |
-
##
|
| 184 |
|
| 185 |
### Installation
|
| 186 |
```bash
|
|
|
|
|
|
|
| 187 |
npx ruvector install
|
| 188 |
```
|
| 189 |
|
| 190 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
```bash
|
| 192 |
wget https://huggingface.co/ruv/ruvltra/resolve/main/ruvltra-claude-code-0.5b-q4_k_m.gguf
|
| 193 |
```
|
|
@@ -211,22 +208,9 @@ llm.load_model("ruvltra-claude-code-0.5b-q4_k_m.gguf", Default::default())?;
|
|
| 211 |
let agent = llm.generate("Route: fix bug\nAgent:", GenerateParams::default().with_max_tokens(8))?;
|
| 212 |
```
|
| 213 |
|
| 214 |
-
### Node.js Example (Hybrid Routing)
|
| 215 |
-
```javascript
|
| 216 |
-
const { SemanticRouter } = require('@ruvector/ruvllm');
|
| 217 |
-
|
| 218 |
-
const router = new SemanticRouter({
|
| 219 |
-
modelPath: 'ruvltra-claude-code-0.5b-q4_k_m.gguf',
|
| 220 |
-
strategy: 'keyword-first' // 100% accuracy
|
| 221 |
-
});
|
| 222 |
-
|
| 223 |
-
const result = await router.route('Implement authentication system');
|
| 224 |
-
// { agent: 'coder', confidence: 0.92 }
|
| 225 |
-
```
|
| 226 |
-
|
| 227 |
---
|
| 228 |
|
| 229 |
-
##
|
| 230 |
|
| 231 |
The model achieves 100% accuracy using a two-stage routing strategy:
|
| 232 |
|
|
@@ -234,8 +218,8 @@ The model achieves 100% accuracy using a two-stage routing strategy:
|
|
| 234 |
1. KEYWORD MATCHING (Primary)
|
| 235 |
- Check task for trigger keywords
|
| 236 |
- Priority ordering resolves conflicts
|
| 237 |
-
- "investigate"
|
| 238 |
-
- "optimize queries"
|
| 239 |
|
| 240 |
2. EMBEDDING FALLBACK (Secondary)
|
| 241 |
- If no keywords match, use embeddings
|
|
@@ -245,7 +229,39 @@ The model achieves 100% accuracy using a two-stage routing strategy:
|
|
| 245 |
|
| 246 |
---
|
| 247 |
|
| 248 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
|
| 250 |
| Specification | Value |
|
| 251 |
|--------------|-------|
|
|
@@ -258,7 +274,7 @@ The model achieves 100% accuracy using a two-stage routing strategy:
|
|
| 258 |
|
| 259 |
---
|
| 260 |
|
| 261 |
-
##
|
| 262 |
|
| 263 |
| Crate | Description |
|
| 264 |
|-------|-------------|
|
|
@@ -278,7 +294,7 @@ ruvector-sona = { version = "0.1", features = ["serde-support"] }
|
|
| 278 |
|
| 279 |
---
|
| 280 |
|
| 281 |
-
##
|
| 282 |
|
| 283 |
| Component | Minimum |
|
| 284 |
|-----------|---------|
|
|
@@ -289,24 +305,22 @@ ruvector-sona = { version = "0.1", features = ["serde-support"] }
|
|
| 289 |
|
| 290 |
---
|
| 291 |
|
| 292 |
-
##
|
| 293 |
|
| 294 |
```
|
| 295 |
-
Task
|
| 296 |
(free) (100% acc) (pay here)
|
| 297 |
|
| 298 |
-
Query
|
| 299 |
(free) (free) (free) (free)
|
| 300 |
```
|
| 301 |
|
| 302 |
-
**Philosophy:** Simple, frequent decisions
|
| 303 |
-
|
| 304 |
-
---
|
| 305 |
|
| 306 |
---
|
| 307 |
|
| 308 |
<details>
|
| 309 |
-
<summary><b>
|
| 310 |
|
| 311 |
### Training Data
|
| 312 |
|
|
@@ -315,12 +329,13 @@ Query ──► RuvLTRA ──► Embedding ──► HNSW ──► Context
|
|
| 315 |
| Base Triplets | 578 | Claude Code routing examples |
|
| 316 |
| Claude Hard Negatives (Batch 1) | 100 | Opus 4.5 generated confusing pairs |
|
| 317 |
| Claude Hard Negatives (Batch 2) | 400 | Additional confusing pairs |
|
| 318 |
-
|
|
|
|
|
| 319 |
|
| 320 |
### Training Procedure
|
| 321 |
|
| 322 |
```
|
| 323 |
-
Pipeline: Hard Negative Generation
|
| 324 |
|
| 325 |
1. Generate confusing agent pairs using Claude Opus 4.5
|
| 326 |
2. Train with Triplet Loss + InfoNCE Loss
|
|
@@ -350,7 +365,7 @@ Pipeline: Hard Negative Generation → Contrastive Training → GRPO Feedback
|
|
| 350 |
</details>
|
| 351 |
|
| 352 |
<details>
|
| 353 |
-
<summary><b>
|
| 354 |
|
| 355 |
### Benchmark: Claude Flow Agent Routing (20 test cases)
|
| 356 |
|
|
@@ -391,57 +406,40 @@ Pipeline: Hard Negative Generation → Contrastive Training → GRPO Feedback
|
|
| 391 |
</details>
|
| 392 |
|
| 393 |
<details>
|
| 394 |
-
<summary><b>
|
| 395 |
|
| 396 |
### Intended Use
|
| 397 |
|
| 398 |
-
|
| 399 |
- Task routing in Claude Code workflows
|
| 400 |
-
- Agent classification (
|
| 401 |
- Semantic embedding for HNSW search
|
| 402 |
- Local inference (<10ms latency)
|
| 403 |
- Cost optimization (avoid API calls for routing)
|
| 404 |
|
| 405 |
-
|
| 406 |
- General code generation
|
| 407 |
- Multi-step reasoning
|
| 408 |
- Chat/conversation
|
| 409 |
- Languages other than English
|
| 410 |
-
- Agent types beyond
|
| 411 |
|
| 412 |
### Known Limitations
|
| 413 |
|
| 414 |
-
1. **Fixed Agent Types**:
|
| 415 |
2. **English Only**: Training data is English-only
|
| 416 |
3. **Domain Specific**: Optimized for software development tasks
|
| 417 |
4. **Embedding Fallback**: 88.2% accuracy when keywords don't match
|
| 418 |
5. **Context Length**: Optimal for short task descriptions (<100 tokens)
|
| 419 |
|
| 420 |
-
### Bias Considerations
|
| 421 |
-
|
| 422 |
-
- Training data generated from Claude Opus 4.5 may inherit biases
|
| 423 |
-
- Agent keywords favor common software terminology
|
| 424 |
-
- Security-related tasks may be over-classified to security-architect
|
| 425 |
-
|
| 426 |
</details>
|
| 427 |
|
| 428 |
<details>
|
| 429 |
-
<summary><b>
|
| 430 |
-
|
| 431 |
-
### Available Files
|
| 432 |
-
|
| 433 |
-
| File | Size | Format | Use Case |
|
| 434 |
-
|------|------|--------|----------|
|
| 435 |
-
| `ruvltra-claude-code-0.5b-q4_k_m.gguf` | 398 MB | GGUF Q4_K_M | Production routing |
|
| 436 |
-
| `ruvltra-small-0.5b-q4_k_m.gguf` | 398 MB | GGUF Q4_K_M | General embeddings |
|
| 437 |
-
| `ruvltra-medium-1.1b-q4_k_m.gguf` | 800 MB | GGUF Q4_K_M | Higher accuracy |
|
| 438 |
-
| `training/v2.3-sota-stats.json` | 1 KB | JSON | Training metrics |
|
| 439 |
-
| `training/v2.3-info.json` | 2 KB | JSON | Training config |
|
| 440 |
-
|
| 441 |
-
### Version History
|
| 442 |
|
| 443 |
| Version | Date | Changes |
|
| 444 |
|---------|------|---------|
|
|
|
|
| 445 |
| v2.3 | 2025-01-20 | 500+ hard negatives, 48% ratio, GRPO feedback |
|
| 446 |
| v2.2 | 2025-01-15 | 100 hard negatives, 18% ratio |
|
| 447 |
| v2.1 | 2025-01-10 | Contrastive learning, triplet loss |
|
|
@@ -451,7 +449,7 @@ Pipeline: Hard Negative Generation → Contrastive Training → GRPO Feedback
|
|
| 451 |
</details>
|
| 452 |
|
| 453 |
<details>
|
| 454 |
-
<summary><b>
|
| 455 |
|
| 456 |
### BibTeX
|
| 457 |
|
|
@@ -461,70 +459,21 @@ Pipeline: Hard Negative Generation → Contrastive Training → GRPO Feedback
|
|
| 461 |
author = {ruv},
|
| 462 |
year = {2025},
|
| 463 |
url = {https://huggingface.co/ruv/ruvltra},
|
| 464 |
-
version = {2.
|
| 465 |
license = {Apache-2.0},
|
| 466 |
-
keywords = {agent-routing, embeddings, claude-code, contrastive-learning}
|
| 467 |
}
|
| 468 |
```
|
| 469 |
|
| 470 |
-
### Plain Text
|
| 471 |
-
|
| 472 |
-
```
|
| 473 |
-
ruv. (2025). RuvLTRA: Local Task Routing for Claude Code Workflows (Version 2.3).
|
| 474 |
-
https://huggingface.co/ruv/ruvltra
|
| 475 |
-
```
|
| 476 |
-
|
| 477 |
-
</details>
|
| 478 |
-
|
| 479 |
-
<details>
|
| 480 |
-
<summary><b>❓ FAQ & Troubleshooting</b></summary>
|
| 481 |
-
|
| 482 |
-
### Common Questions
|
| 483 |
-
|
| 484 |
-
**Q: Why use this instead of Claude API for routing?**
|
| 485 |
-
A: RuvLTRA is free, runs locally in <10ms, and achieves 100% accuracy with hybrid strategy. Claude API adds latency (~500ms) and costs ~$0.003 per call.
|
| 486 |
-
|
| 487 |
-
**Q: Can I add custom agent types?**
|
| 488 |
-
A: Not with the current model. You'd need to fine-tune with triplets including your custom agents.
|
| 489 |
-
|
| 490 |
-
**Q: Does it work offline?**
|
| 491 |
-
A: Yes, fully offline after downloading the GGUF model.
|
| 492 |
-
|
| 493 |
-
**Q: What's the difference between embedding-only and hybrid?**
|
| 494 |
-
A: Embedding-only uses semantic similarity (88.2% accuracy). Hybrid checks keywords first, then falls back to embeddings (100% accuracy).
|
| 495 |
-
|
| 496 |
-
### Troubleshooting
|
| 497 |
-
|
| 498 |
-
**Model loading fails:**
|
| 499 |
-
```bash
|
| 500 |
-
# Ensure you have enough RAM (500MB+)
|
| 501 |
-
# Check file integrity
|
| 502 |
-
sha256sum ruvltra-claude-code-0.5b-q4_k_m.gguf
|
| 503 |
-
```
|
| 504 |
-
|
| 505 |
-
**Low accuracy:**
|
| 506 |
-
```javascript
|
| 507 |
-
// Use keyword-first strategy for 100% accuracy
|
| 508 |
-
const router = new SemanticRouter({
|
| 509 |
-
strategy: 'keyword-first' // Not 'embedding-only'
|
| 510 |
-
});
|
| 511 |
-
```
|
| 512 |
-
|
| 513 |
-
**Slow inference:**
|
| 514 |
-
```bash
|
| 515 |
-
# Enable Metal GPU on Apple Silicon
|
| 516 |
-
export GGML_METAL=1
|
| 517 |
-
```
|
| 518 |
-
|
| 519 |
</details>
|
| 520 |
|
| 521 |
---
|
| 522 |
|
| 523 |
-
##
|
| 524 |
|
| 525 |
Apache 2.0 - Free for commercial and personal use.
|
| 526 |
|
| 527 |
-
##
|
| 528 |
|
| 529 |
- [GitHub Repository](https://github.com/ruvnet/ruvector)
|
| 530 |
- [Claude Flow](https://github.com/ruvnet/claude-flow)
|
|
@@ -532,6 +481,6 @@ Apache 2.0 - Free for commercial and personal use.
|
|
| 532 |
- [Training Code](https://github.com/ruvnet/ruvector/tree/main/crates/ruvllm/src/training)
|
| 533 |
- [NPM Package](https://www.npmjs.com/package/@ruvector/ruvllm)
|
| 534 |
|
| 535 |
-
##
|
| 536 |
|
| 537 |
-
`agent-routing` `task-classification` `claude-code` `embeddings` `semantic-search` `gguf` `quantized` `edge-ai` `local-inference` `contrastive-learning` `triplet-loss` `infonce` `qwen` `llm` `mlops` `cost-optimization` `multi-agent` `swarm` `ruvector` `sona`
|
|
|
|
| 24 |
- sota
|
| 25 |
- task-routing
|
| 26 |
- semantic-search
|
| 27 |
+
- ecosystem
|
| 28 |
library_name: ruvllm
|
| 29 |
pipeline_tag: text-classification
|
| 30 |
base_model: Qwen/Qwen2.5-0.5B-Instruct
|
|
|
|
| 60 |
example_title: Architecture Task
|
| 61 |
---
|
| 62 |
|
| 63 |
+
# RuvLTRA v2.4 - Ecosystem Edition
|
| 64 |
|
| 65 |
<p align="center">
|
| 66 |
<img src="https://img.shields.io/badge/Hybrid_Routing-100%25-brightgreen" alt="Hybrid Accuracy">
|
|
|
|
| 69 |
<img src="https://img.shields.io/badge/Latency-<10ms-orange" alt="Latency">
|
| 70 |
<img src="https://img.shields.io/badge/Capabilities-388-cyan" alt="Capabilities">
|
| 71 |
<img src="https://img.shields.io/badge/License-Apache%202.0-green" alt="License">
|
| 72 |
+
<img src="https://img.shields.io/badge/Version-v2.4-purple" alt="Version">
|
| 73 |
</p>
|
| 74 |
|
| 75 |
+
**RuvLTRA** is a collection of optimized models designed for **local routing, embeddings, and task classification** in Claude Code workflows - achieving **100% routing accuracy** with hybrid strategy.
|
| 76 |
|
| 77 |
+
## What's New in v2.4 (Ecosystem Edition)
|
| 78 |
+
|
| 79 |
+
- **2,545 training triplets** (1,078 SOTA + 1,467 ecosystem-specific)
|
| 80 |
+
- **Full ecosystem coverage**: claude-flow, agentic-flow, ruvector
|
| 81 |
+
- **388 total capabilities** across all tools
|
| 82 |
+
- **62 validation tests** with 100% accuracy
|
| 83 |
+
- **30-epoch SOTA training** with 88.2% embedding accuracy
|
| 84 |
+
|
| 85 |
+
## Key Philosophy
|
| 86 |
|
| 87 |
> **Benchmark Note:** HumanEval/MBPP don't apply here. RuvLTRA isn't designed to compete with Claude for code generation from scratch.
|
| 88 |
|
|
|
|
| 90 |
|
| 91 |
| Task | RuvLTRA | Claude API |
|
| 92 |
|------|---------|------------|
|
| 93 |
+
| Route task to correct agent | Local, fast, **100% accuracy** | Overkill |
|
| 94 |
+
| Generate embeddings for HNSW | Purpose-built | No embedding API |
|
| 95 |
+
| Quick classification/routing | <10ms local | ~500ms+ API |
|
| 96 |
+
| Memory retrieval scoring | Integrated | Not designed for |
|
| 97 |
+
| Complex code generation | Use Claude | Optimal |
|
| 98 |
+
| Multi-step reasoning | Use Claude | Optimal |
|
| 99 |
|
| 100 |
---
|
| 101 |
|
| 102 |
+
## SOTA: 100% Routing Accuracy
|
| 103 |
|
| 104 |
+
Using **hybrid keyword+embedding strategy** plus **contrastive fine-tuning**, RuvLTRA achieves:
|
| 105 |
|
| 106 |
### SOTA Benchmark Results
|
| 107 |
|
|
|
|
| 118 |
| Embedding Only | 88.2% | 40.0% | +48.2 pts |
|
| 119 |
| **Keyword-First Hybrid** | **100.0%** | 95.0% | +5 pts |
|
| 120 |
|
| 121 |
+
### v2.4 Training Enhancements
|
| 122 |
|
| 123 |
+
| Feature | v2.3 | v2.4 |
|
| 124 |
+
|---------|------|------|
|
| 125 |
+
| Training Triplets | 1,078 | **2,545** |
|
| 126 |
+
| Ecosystem Coverage | Claude Flow only | **Full ecosystem** |
|
| 127 |
+
| Total Capabilities | 179 | **388** |
|
| 128 |
+
| Validation Tests | 20 | **62** |
|
| 129 |
+
| Hard Negative Ratio | 18% | **18%** |
|
| 130 |
+
| Training Epochs | 20 | **30** |
|
| 131 |
|
| 132 |
### Ecosystem Coverage (v2.4)
|
| 133 |
|
|
|
|
| 137 |
| **agentic-flow** | 17 commands | 33 types | 32 MCP tools, 9 RL algorithms |
|
| 138 |
| **ruvector** | 6 CLI, 22 Rust crates | 12 NPM | 6 attention, 4 graph algorithms |
|
| 139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
---
|
| 141 |
|
| 142 |
+
## Cost Savings
|
| 143 |
|
| 144 |
| Operation | Claude API | RuvLTRA Local | Savings |
|
| 145 |
|-----------|------------|---------------|---------|
|
|
|
|
| 151 |
|
| 152 |
---
|
| 153 |
|
| 154 |
+
## Available Models
|
| 155 |
|
| 156 |
| Model | Size | RAM | Latency |
|
| 157 |
|-------|------|-----|---------|
|
|
|
|
| 161 |
|
| 162 |
---
|
| 163 |
|
| 164 |
+
## Quick Start
|
| 165 |
|
| 166 |
### Installation
|
| 167 |
```bash
|
| 168 |
+
npm install @ruvector/ruvllm
|
| 169 |
+
# or
|
| 170 |
npx ruvector install
|
| 171 |
```
|
| 172 |
|
| 173 |
+
### Automatic Model Download
|
| 174 |
+
```javascript
|
| 175 |
+
const { SemanticRouter } = require('@ruvector/ruvllm');
|
| 176 |
+
|
| 177 |
+
// Automatically downloads from HuggingFace if not cached
|
| 178 |
+
const router = new SemanticRouter({
|
| 179 |
+
model: 'ruvltra-claude-code-0.5b', // Auto-downloads
|
| 180 |
+
strategy: 'keyword-first'
|
| 181 |
+
});
|
| 182 |
+
|
| 183 |
+
const result = await router.route('Implement authentication system');
|
| 184 |
+
// { agent: 'coder', confidence: 0.92 }
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
### Manual Download
|
| 188 |
```bash
|
| 189 |
wget https://huggingface.co/ruv/ruvltra/resolve/main/ruvltra-claude-code-0.5b-q4_k_m.gguf
|
| 190 |
```
|
|
|
|
| 208 |
let agent = llm.generate("Route: fix bug\nAgent:", GenerateParams::default().with_max_tokens(8))?;
|
| 209 |
```
|
| 210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
---
|
| 212 |
|
| 213 |
+
## Hybrid Routing Algorithm
|
| 214 |
|
| 215 |
The model achieves 100% accuracy using a two-stage routing strategy:
|
| 216 |
|
|
|
|
| 218 |
1. KEYWORD MATCHING (Primary)
|
| 219 |
- Check task for trigger keywords
|
| 220 |
- Priority ordering resolves conflicts
|
| 221 |
+
- "investigate" -> researcher (priority)
|
| 222 |
+
- "optimize queries" -> optimizer
|
| 223 |
|
| 224 |
2. EMBEDDING FALLBACK (Secondary)
|
| 225 |
- If no keywords match, use embeddings
|
|
|
|
| 229 |
|
| 230 |
---
|
| 231 |
|
| 232 |
+
## Supported Agent Types (58+)
|
| 233 |
+
|
| 234 |
+
| Agent | Keywords | Use Cases |
|
| 235 |
+
|-------|----------|-----------|
|
| 236 |
+
| `coder` | implement, build, create | Code implementation |
|
| 237 |
+
| `researcher` | research, investigate, explore | Information gathering |
|
| 238 |
+
| `reviewer` | review, pull request, quality | Code review |
|
| 239 |
+
| `tester` | test, unit, integration | Testing |
|
| 240 |
+
| `architect` | design, architecture, schema | System design |
|
| 241 |
+
| `security-architect` | security, vulnerability, xss | Security analysis |
|
| 242 |
+
| `debugger` | debug, fix, bug, error | Bug fixing |
|
| 243 |
+
| `documenter` | jsdoc, comment, readme | Documentation |
|
| 244 |
+
| `refactorer` | refactor, async/await | Code refactoring |
|
| 245 |
+
| `optimizer` | optimize, cache, performance | Performance |
|
| 246 |
+
| `devops` | deploy, ci/cd, kubernetes | DevOps |
|
| 247 |
+
| `api-docs` | openapi, swagger, api spec | API documentation |
|
| 248 |
+
| `planner` | sprint, plan, roadmap | Project planning |
|
| 249 |
+
|
| 250 |
+
### Extended Capabilities (v2.4)
|
| 251 |
+
|
| 252 |
+
| Category | Examples |
|
| 253 |
+
|----------|----------|
|
| 254 |
+
| **MCP Tools** | memory_store, agent_spawn, swarm_init, hooks_pre-task |
|
| 255 |
+
| **Swarm Topologies** | hierarchical, mesh, ring, star, adaptive |
|
| 256 |
+
| **Consensus** | byzantine, raft, gossip, crdt, quorum |
|
| 257 |
+
| **Learning** | SONA train, LoRA finetune, EWC++ consolidate, GRPO optimize |
|
| 258 |
+
| **Attention** | flash, multi-head, linear, hyperbolic, MoE |
|
| 259 |
+
| **Graph** | mincut, GNN embed, spectral, pagerank |
|
| 260 |
+
| **Hardware** | Metal GPU, NEON SIMD, ANE neural engine |
|
| 261 |
+
|
| 262 |
+
---
|
| 263 |
+
|
| 264 |
+
## Technical Specifications
|
| 265 |
|
| 266 |
| Specification | Value |
|
| 267 |
|--------------|-------|
|
|
|
|
| 274 |
|
| 275 |
---
|
| 276 |
|
| 277 |
+
## Rust Crates
|
| 278 |
|
| 279 |
| Crate | Description |
|
| 280 |
|-------|-------------|
|
|
|
|
| 294 |
|
| 295 |
---
|
| 296 |
|
| 297 |
+
## Requirements
|
| 298 |
|
| 299 |
| Component | Minimum |
|
| 300 |
|-----------|---------|
|
|
|
|
| 305 |
|
| 306 |
---
|
| 307 |
|
| 308 |
+
## Architecture
|
| 309 |
|
| 310 |
```
|
| 311 |
+
Task --> RuvLTRA --> Agent Type --> Claude API
|
| 312 |
(free) (100% acc) (pay here)
|
| 313 |
|
| 314 |
+
Query --> RuvLTRA --> Embedding --> HNSW --> Context
|
| 315 |
(free) (free) (free) (free)
|
| 316 |
```
|
| 317 |
|
| 318 |
+
**Philosophy:** Simple, frequent decisions -> RuvLTRA (free, <10ms, 100% accurate). Complex reasoning -> Claude API (worth the cost).
|
|
|
|
|
|
|
| 319 |
|
| 320 |
---
|
| 321 |
|
| 322 |
<details>
|
| 323 |
+
<summary><b>Training Details</b></summary>
|
| 324 |
|
| 325 |
### Training Data
|
| 326 |
|
|
|
|
| 329 |
| Base Triplets | 578 | Claude Code routing examples |
|
| 330 |
| Claude Hard Negatives (Batch 1) | 100 | Opus 4.5 generated confusing pairs |
|
| 331 |
| Claude Hard Negatives (Batch 2) | 400 | Additional confusing pairs |
|
| 332 |
+
| Ecosystem Triplets | 1,467 | Full ecosystem coverage |
|
| 333 |
+
| **Total v2.4** | **2,545** | Combined training set |
|
| 334 |
|
| 335 |
### Training Procedure
|
| 336 |
|
| 337 |
```
|
| 338 |
+
Pipeline: Hard Negative Generation -> Contrastive Training -> GRPO Feedback -> GGUF Export
|
| 339 |
|
| 340 |
1. Generate confusing agent pairs using Claude Opus 4.5
|
| 341 |
2. Train with Triplet Loss + InfoNCE Loss
|
|
|
|
| 365 |
</details>
|
| 366 |
|
| 367 |
<details>
|
| 368 |
+
<summary><b>Evaluation Results</b></summary>
|
| 369 |
|
| 370 |
### Benchmark: Claude Flow Agent Routing (20 test cases)
|
| 371 |
|
|
|
|
| 406 |
</details>
|
| 407 |
|
| 408 |
<details>
|
| 409 |
+
<summary><b>Limitations & Intended Use</b></summary>
|
| 410 |
|
| 411 |
### Intended Use
|
| 412 |
|
| 413 |
+
**Designed For:**
|
| 414 |
- Task routing in Claude Code workflows
|
| 415 |
+
- Agent classification (58+ types)
|
| 416 |
- Semantic embedding for HNSW search
|
| 417 |
- Local inference (<10ms latency)
|
| 418 |
- Cost optimization (avoid API calls for routing)
|
| 419 |
|
| 420 |
+
**NOT Designed For:**
|
| 421 |
- General code generation
|
| 422 |
- Multi-step reasoning
|
| 423 |
- Chat/conversation
|
| 424 |
- Languages other than English
|
| 425 |
+
- Agent types beyond supported set
|
| 426 |
|
| 427 |
### Known Limitations
|
| 428 |
|
| 429 |
+
1. **Fixed Agent Types**: Routes to predefined agents
|
| 430 |
2. **English Only**: Training data is English-only
|
| 431 |
3. **Domain Specific**: Optimized for software development tasks
|
| 432 |
4. **Embedding Fallback**: 88.2% accuracy when keywords don't match
|
| 433 |
5. **Context Length**: Optimal for short task descriptions (<100 tokens)
|
| 434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 435 |
</details>
|
| 436 |
|
| 437 |
<details>
|
| 438 |
+
<summary><b>Version History</b></summary>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
|
| 440 |
| Version | Date | Changes |
|
| 441 |
|---------|------|---------|
|
| 442 |
+
| **v2.4** | 2025-01-21 | Ecosystem Edition: 2,545 triplets, 388 capabilities, 62 tests |
|
| 443 |
| v2.3 | 2025-01-20 | 500+ hard negatives, 48% ratio, GRPO feedback |
|
| 444 |
| v2.2 | 2025-01-15 | 100 hard negatives, 18% ratio |
|
| 445 |
| v2.1 | 2025-01-10 | Contrastive learning, triplet loss |
|
|
|
|
| 449 |
</details>
|
| 450 |
|
| 451 |
<details>
|
| 452 |
+
<summary><b>Citation</b></summary>
|
| 453 |
|
| 454 |
### BibTeX
|
| 455 |
|
|
|
|
| 459 |
author = {ruv},
|
| 460 |
year = {2025},
|
| 461 |
url = {https://huggingface.co/ruv/ruvltra},
|
| 462 |
+
version = {2.4},
|
| 463 |
license = {Apache-2.0},
|
| 464 |
+
keywords = {agent-routing, embeddings, claude-code, contrastive-learning, ecosystem}
|
| 465 |
}
|
| 466 |
```
|
| 467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 468 |
</details>
|
| 469 |
|
| 470 |
---
|
| 471 |
|
| 472 |
+
## License
|
| 473 |
|
| 474 |
Apache 2.0 - Free for commercial and personal use.
|
| 475 |
|
| 476 |
+
## Links
|
| 477 |
|
| 478 |
- [GitHub Repository](https://github.com/ruvnet/ruvector)
|
| 479 |
- [Claude Flow](https://github.com/ruvnet/claude-flow)
|
|
|
|
| 481 |
- [Training Code](https://github.com/ruvnet/ruvector/tree/main/crates/ruvllm/src/training)
|
| 482 |
- [NPM Package](https://www.npmjs.com/package/@ruvector/ruvllm)
|
| 483 |
|
| 484 |
+
## Keywords
|
| 485 |
|
| 486 |
+
`agent-routing` `task-classification` `claude-code` `embeddings` `semantic-search` `gguf` `quantized` `edge-ai` `local-inference` `contrastive-learning` `triplet-loss` `infonce` `qwen` `llm` `mlops` `cost-optimization` `multi-agent` `swarm` `ruvector` `sona` `ecosystem`
|