@ruvector/ruvllm 2.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GPU-LOOP.md +229 -0
- package/LICENSE +201 -0
- package/NOTICE +9 -0
- package/README.md +157 -263
- package/examples/gpu-loop.example.json +26 -0
- package/package.json +50 -120
- package/src/adapters-cli.mjs +23 -0
- package/src/adapters.mjs +91 -0
- package/src/cli.mjs +30 -0
- package/src/engine.mjs +238 -0
- package/src/fixture.mjs +38 -0
- package/src/gpu-host.mjs +47 -0
- package/src/gpu-loop-cli.mjs +67 -0
- package/src/gpu-loop.mjs +184 -0
- package/src/gpu-spool-adapter.mjs +80 -0
- package/src/vast-host-adapter.mjs +274 -0
- package/bin/cli.js +0 -1020
- package/dist/cjs/benchmarks/embedding-benchmark.d.ts +0 -102
- package/dist/cjs/benchmarks/embedding-benchmark.d.ts.map +0 -1
- package/dist/cjs/benchmarks/embedding-benchmark.js +0 -436
- package/dist/cjs/benchmarks/index.d.ts +0 -34
- package/dist/cjs/benchmarks/index.d.ts.map +0 -1
- package/dist/cjs/benchmarks/index.js +0 -132
- package/dist/cjs/benchmarks/model-comparison.d.ts +0 -71
- package/dist/cjs/benchmarks/model-comparison.d.ts.map +0 -1
- package/dist/cjs/benchmarks/model-comparison.js +0 -476
- package/dist/cjs/benchmarks/routing-benchmark.d.ts +0 -70
- package/dist/cjs/benchmarks/routing-benchmark.d.ts.map +0 -1
- package/dist/cjs/benchmarks/routing-benchmark.js +0 -289
- package/dist/cjs/contrastive.d.ts +0 -229
- package/dist/cjs/contrastive.d.ts.map +0 -1
- package/dist/cjs/contrastive.js +0 -589
- package/dist/cjs/engine.d.ts +0 -95
- package/dist/cjs/engine.d.ts.map +0 -1
- package/dist/cjs/engine.js +0 -372
- package/dist/cjs/export.d.ts +0 -182
- package/dist/cjs/export.d.ts.map +0 -1
- package/dist/cjs/export.js +0 -422
- package/dist/cjs/federated.d.ts +0 -233
- package/dist/cjs/federated.d.ts.map +0 -1
- package/dist/cjs/federated.js +0 -525
- package/dist/cjs/index.d.ts +0 -68
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -104
- package/dist/cjs/intelligence.d.ts +0 -136
- package/dist/cjs/intelligence.d.ts.map +0 -1
- package/dist/cjs/intelligence.js +0 -226
- package/dist/cjs/lora.d.ts +0 -251
- package/dist/cjs/lora.d.ts.map +0 -1
- package/dist/cjs/lora.js +0 -509
- package/dist/cjs/models.d.ts +0 -129
- package/dist/cjs/models.d.ts.map +0 -1
- package/dist/cjs/models.js +0 -323
- package/dist/cjs/native.d.ts +0 -92
- package/dist/cjs/native.d.ts.map +0 -1
- package/dist/cjs/native.js +0 -77
- package/dist/cjs/session.d.ts +0 -80
- package/dist/cjs/session.d.ts.map +0 -1
- package/dist/cjs/session.js +0 -203
- package/dist/cjs/simd.d.ts +0 -90
- package/dist/cjs/simd.d.ts.map +0 -1
- package/dist/cjs/simd.js +0 -209
- package/dist/cjs/sona.d.ts +0 -223
- package/dist/cjs/sona.d.ts.map +0 -1
- package/dist/cjs/sona.js +0 -562
- package/dist/cjs/streaming.d.ts +0 -55
- package/dist/cjs/streaming.d.ts.map +0 -1
- package/dist/cjs/streaming.js +0 -131
- package/dist/cjs/training.d.ts +0 -312
- package/dist/cjs/training.d.ts.map +0 -1
- package/dist/cjs/training.js +0 -610
- package/dist/cjs/types.d.ts +0 -615
- package/dist/cjs/types.d.ts.map +0 -1
- package/dist/cjs/types.js +0 -6
- package/dist/esm/benchmarks/embedding-benchmark.d.ts +0 -102
- package/dist/esm/benchmarks/embedding-benchmark.d.ts.map +0 -1
- package/dist/esm/benchmarks/embedding-benchmark.js +0 -427
- package/dist/esm/benchmarks/index.d.ts +0 -34
- package/dist/esm/benchmarks/index.d.ts.map +0 -1
- package/dist/esm/benchmarks/index.js +0 -110
- package/dist/esm/benchmarks/model-comparison.d.ts +0 -71
- package/dist/esm/benchmarks/model-comparison.d.ts.map +0 -1
- package/dist/esm/benchmarks/model-comparison.js +0 -434
- package/dist/esm/benchmarks/routing-benchmark.d.ts +0 -70
- package/dist/esm/benchmarks/routing-benchmark.d.ts.map +0 -1
- package/dist/esm/benchmarks/routing-benchmark.js +0 -283
- package/dist/esm/contrastive.d.ts +0 -229
- package/dist/esm/contrastive.d.ts.map +0 -1
- package/dist/esm/contrastive.js +0 -578
- package/dist/esm/engine.d.ts +0 -95
- package/dist/esm/engine.d.ts.map +0 -1
- package/dist/esm/engine.js +0 -368
- package/dist/esm/export.d.ts +0 -182
- package/dist/esm/export.d.ts.map +0 -1
- package/dist/esm/export.js +0 -414
- package/dist/esm/federated.d.ts +0 -233
- package/dist/esm/federated.d.ts.map +0 -1
- package/dist/esm/federated.js +0 -520
- package/dist/esm/index.d.ts +0 -68
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -84
- package/dist/esm/intelligence.d.ts +0 -136
- package/dist/esm/intelligence.d.ts.map +0 -1
- package/dist/esm/intelligence.js +0 -188
- package/dist/esm/lora.d.ts +0 -251
- package/dist/esm/lora.d.ts.map +0 -1
- package/dist/esm/lora.js +0 -504
- package/dist/esm/models.d.ts +0 -129
- package/dist/esm/models.d.ts.map +0 -1
- package/dist/esm/models.js +0 -282
- package/dist/esm/native.d.ts +0 -92
- package/dist/esm/native.d.ts.map +0 -1
- package/dist/esm/native.js +0 -72
- package/dist/esm/session.d.ts +0 -80
- package/dist/esm/session.d.ts.map +0 -1
- package/dist/esm/session.js +0 -199
- package/dist/esm/simd.d.ts +0 -90
- package/dist/esm/simd.d.ts.map +0 -1
- package/dist/esm/simd.js +0 -205
- package/dist/esm/sona.d.ts +0 -223
- package/dist/esm/sona.d.ts.map +0 -1
- package/dist/esm/sona.js +0 -556
- package/dist/esm/streaming.d.ts +0 -55
- package/dist/esm/streaming.d.ts.map +0 -1
- package/dist/esm/streaming.js +0 -126
- package/dist/esm/training.d.ts +0 -312
- package/dist/esm/training.d.ts.map +0 -1
- package/dist/esm/training.js +0 -603
- package/dist/esm/types.d.ts +0 -615
- package/dist/esm/types.d.ts.map +0 -1
- package/dist/esm/types.js +0 -5
- package/scripts/ensemble-model-compare.js +0 -287
- package/scripts/fix-esm-extensions.mjs +0 -181
- package/scripts/huggingface/README.md +0 -537
- package/scripts/huggingface/publish.sh +0 -112
- package/scripts/hybrid-model-compare.js +0 -373
- package/scripts/improved-model-compare.js +0 -288
- package/scripts/optimized-model-compare.js +0 -364
- package/scripts/real-model-compare.js +0 -280
- package/scripts/smoke-esm.mjs +0 -82
- package/scripts/training/agentic-flow-capabilities.json +0 -329
- package/scripts/training/claude-code-synth.js +0 -505
- package/scripts/training/claude-flow-capabilities.json +0 -1322
- package/scripts/training/claude-hard-negatives.js +0 -222
- package/scripts/training/contrastive-finetune.js +0 -517
- package/scripts/training/ecosystem-triplets.jsonl +0 -1467
- package/scripts/training/generate-ecosystem-triplets.js +0 -1324
- package/scripts/training/routing-dataset.js +0 -634
- package/scripts/training/ruvector-capabilities.json +0 -798
- package/scripts/training/validate-ecosystem.js +0 -381
- package/scripts/training/validation-results.json +0 -23
package/README.md
CHANGED
|
@@ -1,289 +1,183 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MetaHarness weight experiments
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Published on npm as `@ruvector/ruvllm`. Version 4.0.0 replaces the 3.x
|
|
4
|
+
inference runtime from `ruvnet/ruvector` with this package, because ruvllm now
|
|
5
|
+
lives in `ruvnet/ruvllm`. The 3.x API and its CLI subcommands are not part of
|
|
6
|
+
4.x; pin `@ruvector/ruvllm@3` to keep using them. The npm package ships the
|
|
7
|
+
JavaScript controller, GPU loop and Vast.ai host adapter. It does not ship the
|
|
8
|
+
native `weight_evolution` binary, model weights or adapters. Build the binary
|
|
9
|
+
from this repository and pass its path with `--binary`.
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> Inference at **88-135 tok/s** on M4 Pro | **<1ms** SONA adaptation | **6-8x** KV-cache compression via TurboQuant
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
11
|
+
```sh
|
|
15
12
|
npm install @ruvector/ruvllm
|
|
13
|
+
npx ruvllm --help # bounded weight-edit experiments
|
|
14
|
+
npx ruvllm-gpu-loop status --config /abs/private/gpu-loop.json
|
|
16
15
|
```
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
> server, and call it over HTTP.
|
|
43
|
-
|
|
44
|
-
## What's New in v2.5
|
|
45
|
-
|
|
46
|
-
| Feature | Description |
|
|
47
|
-
|---------|-------------|
|
|
48
|
-
| **TurboQuant KV-Cache** | 2-4 bit asymmetric quantization with per-channel scale/zero-point — 6-8x memory reduction, <0.5% perplexity loss |
|
|
49
|
-
| **TurboQuant Embedding Store** | Quantized vector storage with compressed search — 10-30x memory savings |
|
|
50
|
-
| **H2O / PyramidKV Eviction** | Intelligent cache eviction policies for long-context inference |
|
|
51
|
-
| **Optimized Inner Product** | Asymmetric distance on quantized data — skip decompression for 2-4x faster search |
|
|
52
|
-
| **RuvLTRA Models** | Purpose-built 0.5B & 3B models for Claude Flow |
|
|
53
|
-
| **Task-Specific LoRA** | 5 pre-trained adapters (coder, researcher, security, architect, reviewer) |
|
|
54
|
-
| **HuggingFace Hub** | Download/upload models directly |
|
|
55
|
-
| **Adapter Merging** | TIES, DARE, SLERP strategies |
|
|
56
|
-
| **HNSW Routing** | 150x faster semantic matching |
|
|
57
|
-
| **Evaluation Harness** | SWE-Bench testing with 5 ablation modes |
|
|
58
|
-
| **mistral-rs Backend** | Production serving with PagedAttention, X-LoRA, ISQ |
|
|
59
|
-
|
|
60
|
-
## TurboQuant — KV-Cache Compression
|
|
61
|
-
|
|
62
|
-
Reduce inference memory by 6-8x with <0.5% quality loss:
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
import { simd } from '@ruvector/ruvllm/simd';
|
|
66
|
-
|
|
67
|
-
// TurboQuant compresses KV-cache entries at 2-4 bit precision
|
|
68
|
-
// with per-channel asymmetric quantization (scale + zero-point).
|
|
69
|
-
// Eviction policies (H2O, Sliding Window, PyramidKV) keep the
|
|
70
|
-
// most important tokens in cache during long-context generation.
|
|
71
|
-
|
|
72
|
-
// Supported bit widths: 2-bit (32x), 3-bit (10.7x), 4-bit (8x), 8-bit (4x)
|
|
17
|
+
Run multiple bounded RuVLLM edits against one unchanged checkpoint, validate
|
|
18
|
+
supplied evaluations, package RVF evidence, restore every patched checkpoint,
|
|
19
|
+
and rank research-qualified candidates through MetaHarness. This controller
|
|
20
|
+
uses the actual Flywheel, Darwin and Weight-EFT packages pinned in
|
|
21
|
+
[package-lock.json](package-lock.json).
|
|
22
|
+
|
|
23
|
+
The runner does not perform inference, discover an effective weight edit, train
|
|
24
|
+
an adapter or activate a model. CPU fixtures exercise real file editing and
|
|
25
|
+
restoration with explicitly synthetic evaluation receipts. External evaluation
|
|
26
|
+
files remain caller-supplied evidence; hashes do not authenticate their origin.
|
|
27
|
+
|
|
28
|
+
## Install and run the CPU fixture
|
|
29
|
+
|
|
30
|
+
Requirements: Linux or macOS, Node 22+, Python 3.12+, a C linker, and Rust 1.97.1
|
|
31
|
+
as pinned by `native/rust-toolchain.toml`. Activate any locally installed Rust
|
|
32
|
+
toolchain before using Cargo. From the repository root:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
(cd integrations/metaharness && npm ci --ignore-scripts)
|
|
36
|
+
(cd native && cargo build --locked --release --bin weight_evolution)
|
|
37
|
+
python3 native/verify_source.py
|
|
38
|
+
node integrations/metaharness/src/cli.mjs fixture \
|
|
39
|
+
--dir "$PWD/runtime/metaharness-fixture" \
|
|
40
|
+
--binary "$PWD/native/target/release/weight_evolution"
|
|
73
41
|
```
|
|
74
42
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
43
|
+
Create the fixture's parent directory first (`mkdir -p runtime`). Its own directory
|
|
44
|
+
must not exist: exclusive creation prevents accidental replacement. For another
|
|
45
|
+
fixture use a new directory. The report should select `fixture-improvement`, leave
|
|
46
|
+
`unevaluated-control` unqualified, verify RVF and exact rollback for both, and
|
|
47
|
+
report `inferencePerformed: false`, `independentConfirmation: false` and
|
|
48
|
+
`productionActivation: false`. A selected synthetic candidate says nothing about
|
|
49
|
+
actual model accuracy.
|
|
50
|
+
|
|
51
|
+
## Configure real experiment inputs
|
|
52
|
+
|
|
53
|
+
Prepare reviewed source checkpoint, patch, policy and optional evaluation JSON
|
|
54
|
+
under explicit input roots. Native request/data contracts are described in the
|
|
55
|
+
[native guide](../../native/README.md). Patch generation remains model specific;
|
|
56
|
+
the controller does not guess useful tensor edits.
|
|
57
|
+
|
|
58
|
+
Run the project-local installer with paths you control:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
bash scripts/install-metaharness.sh \
|
|
62
|
+
--config-dir /absolute/private/operator-profile \
|
|
63
|
+
--read-root /absolute/checkpoints \
|
|
64
|
+
--read-root /absolute/experiment-inputs \
|
|
65
|
+
--policy /absolute/experiment-inputs/policy.json \
|
|
66
|
+
--output-root /absolute/private/experiment-outputs
|
|
99
67
|
```
|
|
100
68
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// Get SONA learning stats
|
|
125
|
-
sonaStats(): SonaStats | null;
|
|
126
|
-
|
|
127
|
-
// Adapt on feedback
|
|
128
|
-
adapt(input: Float32Array, quality: number): void;
|
|
69
|
+
It installs frozen npm dependencies without lifecycle scripts, builds the native
|
|
70
|
+
binary, verifies native provenance and runs its smoke fixture. It creates a
|
|
71
|
+
private runtime profile and Claude launcher without changing global settings.
|
|
72
|
+
Repeat `--read-root`/`--policy` for additional approved inputs. Existing profile
|
|
73
|
+
files are never replaced; use another directory for a new profile. Existing config
|
|
74
|
+
and output directories must be owner-only. `--configure-only` skips installation
|
|
75
|
+
and building but still checks native readiness.
|
|
76
|
+
|
|
77
|
+
Example plan inside an approved read root:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"schema": "ruvllm-experiment-plan/v1",
|
|
82
|
+
"evidenceMode": "external",
|
|
83
|
+
"source": "/absolute/checkpoints/source.safetensors",
|
|
84
|
+
"policy": "/absolute/experiment-inputs/policy.json",
|
|
85
|
+
"candidates": [
|
|
86
|
+
{
|
|
87
|
+
"id": "candidate-01",
|
|
88
|
+
"patch": "/absolute/experiment-inputs/patch.json",
|
|
89
|
+
"evaluation": "/absolute/experiment-inputs/evaluation.json"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
129
92
|
}
|
|
130
93
|
```
|
|
131
94
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
modelPath?: string; // Not supported: ignored with a RUVLLM_UNSUPPORTED_OPTION warning
|
|
137
|
-
strict?: boolean; // Throw instead of warning about placeholder text (default: false)
|
|
138
|
-
sonaEnabled?: boolean; // Enable SONA learning (default: true)
|
|
139
|
-
flashAttention?: boolean; // Use Flash Attention 2 (default: true)
|
|
140
|
-
maxTokens?: number; // Max generation tokens (default: 256)
|
|
141
|
-
temperature?: number; // Sampling temperature (default: 0.7)
|
|
142
|
-
topP?: number; // Top-p sampling (default: 0.9)
|
|
143
|
-
}
|
|
95
|
+
```sh
|
|
96
|
+
node integrations/metaharness/src/cli.mjs run \
|
|
97
|
+
--config /absolute/private/operator-profile/runtime.json \
|
|
98
|
+
--plan /absolute/experiment-inputs/plan.json
|
|
144
99
|
```
|
|
145
100
|
|
|
146
|
-
|
|
101
|
+
Omit `evaluation` to run mechanical checks without qualification. After an external
|
|
102
|
+
inference runner has evaluated a candidate, submit its hash-bound evaluation in a
|
|
103
|
+
new plan/run. Candidate checkpoint hashes are deterministic for the same patch;
|
|
104
|
+
new artifact paths do not relax identity checks. Paired baseline, protocol, suite,
|
|
105
|
+
runtime, precision and output-budget consistency remain the evaluator's responsibility.
|
|
147
106
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
topK?: number;
|
|
154
|
-
repetitionPenalty?: number;
|
|
155
|
-
stopSequences?: string[];
|
|
156
|
-
}
|
|
157
|
-
```
|
|
107
|
+
Runs use new private `run-*` directories and preserve rejected candidates. Reports
|
|
108
|
+
bind config/plan/source/policy/binary/gate/patch/evaluation identities and record
|
|
109
|
+
rollback and RVF verification. Native rejection records a reason. Structural or
|
|
110
|
+
restoration failures abort; interrupted runs can leave artifacts. Reconcile those
|
|
111
|
+
directories before retrying; never erase failed evidence to manufacture success.
|
|
158
112
|
|
|
159
|
-
##
|
|
113
|
+
## Claude Code and Ruflo
|
|
160
114
|
|
|
161
|
-
|
|
115
|
+
Load [ruflo-metaharness](../../plugins/ruflo-metaharness/README.md) using the
|
|
116
|
+
generated `launch-claude.sh`, or set `RUVLLM_EXPERIMENT_CONFIG` and use Claude's
|
|
117
|
+
`--plugin-dir`. The `/ruflo-metaharness:weight-experiment` command and reviewer
|
|
118
|
+
agent guide the bounded workflow. Its single MCP tool accepts a plan path; the
|
|
119
|
+
model cannot override the operator configuration. The same stdio server can be
|
|
120
|
+
registered in a Ruflo project's MCP configuration. Portable wire tests exercise
|
|
121
|
+
the real engine; installed Claude/Ruflo client acceptance is separate.
|
|
162
122
|
|
|
163
|
-
|
|
164
|
-
import { simd } from '@ruvector/ruvllm/simd';
|
|
123
|
+
## Scheduled GPU work
|
|
165
124
|
|
|
166
|
-
|
|
167
|
-
|
|
125
|
+
For scheduled GPU work, use the [durable GPU loop](GPU-LOOP.md). It supports
|
|
126
|
+
host-owned ruOS secret references, Vast job descriptors, persisted reservations,
|
|
127
|
+
deadline-aware polling and confirmed cleanup. Local contract tests require no
|
|
128
|
+
live provider. The bundled file handoff keeps requests pending for a trusted host.
|
|
168
129
|
|
|
169
|
-
|
|
170
|
-
const output = simd.matmul(matrix, vector);
|
|
130
|
+
## Weight-EFT data and plans
|
|
171
131
|
|
|
172
|
-
|
|
173
|
-
const attended = simd.flashAttention(query, key, value, scale);
|
|
132
|
+
The data-only adapter CLI reads JSON stdin, with a 16 MiB bound:
|
|
174
133
|
|
|
175
|
-
|
|
176
|
-
|
|
134
|
+
```sh
|
|
135
|
+
node integrations/metaharness/src/adapters-cli.mjs export < reviewed-archive-input.json > export.json
|
|
136
|
+
node integrations/metaharness/src/adapters-cli.mjs training-plan < training-input.json > plan.json
|
|
137
|
+
node integrations/metaharness/src/adapters-cli.mjs select < measured-candidates.json > selection.json
|
|
177
138
|
```
|
|
178
139
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
'def process(data): return data.split()',
|
|
206
|
-
AblationMode.Full
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
console.log(`Success: ${result.success}, Quality: ${result.qualityScore}`);
|
|
210
|
-
|
|
211
|
-
// Run ablation study (Baseline, RetrievalOnly, AdaptersOnly, R+A, Full)
|
|
212
|
-
const report = await harness.runAblationStudy(tasks);
|
|
213
|
-
for (const [mode, metrics] of Object.entries(report.modeMetrics)) {
|
|
214
|
-
console.log(`${mode}: ${metrics.successRate * 100}% success`);
|
|
215
|
-
}
|
|
140
|
+
`export` takes `{archive, evalHoldout, maxTokens?}`. Archive entries follow the
|
|
141
|
+
pinned Weight-EFT `DarwinTrajectory` contract (`instance_id`, `model`, `tier`,
|
|
142
|
+
boolean `resolved`, `messages`, `model_patch`). All actual evaluation instance IDs
|
|
143
|
+
must be in `evalHoldout`. Output contains standard `sft`/`dpo` arrays, drop reports
|
|
144
|
+
and input hashes. Reward-hacking filtering stays enabled, overlength traces are
|
|
145
|
+
dropped, and tool calls are preserved. These filters cannot authenticate outcomes
|
|
146
|
+
or detect all semantic contamination.
|
|
147
|
+
|
|
148
|
+
`training-plan` takes `{base:{id,paramsB},sftPath,dpoPath,adapterPrefix}`. It emits
|
|
149
|
+
upstream plans plus `executionStatus: not_executed` and
|
|
150
|
+
`runnerCompatibility: adapter-required`. This repository has no upstream
|
|
151
|
+
`ruvllm microlora` executable. Its existing fixed CUDA/PEFT experiment runner is
|
|
152
|
+
not a configurable SFT/DPO trainer. No GPU, model download or paid job is started.
|
|
153
|
+
|
|
154
|
+
`select` takes `{baseline,candidates,envelope}` with entries
|
|
155
|
+
`{id,score,evidenceSha256}`. It replays finite, supplied scores through Darwin's
|
|
156
|
+
contrastive engine. It is development ranking with an immutable envelope and no
|
|
157
|
+
independent confirmation; it cannot authenticate caller-supplied evidence. The
|
|
158
|
+
native runner applies its stricter qualification first.
|
|
159
|
+
|
|
160
|
+
## Tests and benchmark
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
(cd integrations/metaharness && npm test)
|
|
164
|
+
node --test plugins/ruflo-metaharness/test/*.test.mjs
|
|
165
|
+
node integrations/metaharness/bench/run.mjs --iterations 7 --warmup 2 --candidates 2
|
|
216
166
|
```
|
|
217
167
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
// X-LoRA: Per-token adapter routing
|
|
235
|
-
xlora: {
|
|
236
|
-
adapters: ['./adapters/coder', './adapters/researcher'],
|
|
237
|
-
topK: 2,
|
|
238
|
-
},
|
|
239
|
-
// ISQ: Runtime quantization
|
|
240
|
-
isq: {
|
|
241
|
-
bits: 4,
|
|
242
|
-
method: 'awq',
|
|
243
|
-
},
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
const llm = new RuvLLM({ backend });
|
|
247
|
-
await llm.loadModel('mistralai/Mistral-7B-Instruct-v0.2');
|
|
248
|
-
|
|
249
|
-
// Serve multiple concurrent requests
|
|
250
|
-
const response = await llm.query('Write production code');
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
> **Note**: mistral-rs features require the Rust backend with `mistral-rs` feature enabled. Native bindings will use mistral-rs when available.
|
|
254
|
-
|
|
255
|
-
## Supported Models
|
|
256
|
-
|
|
257
|
-
- **RuvLTRA-Small** (494M) - Q4K, Q5K, Q8
|
|
258
|
-
- **RuvLTRA-Medium** (3B) - Q4K, Q5K, Q8
|
|
259
|
-
- **Qwen 2.5** (0.5B-72B)
|
|
260
|
-
- **Llama 3.x** (8B-70B)
|
|
261
|
-
- **Mistral** (7B-22B)
|
|
262
|
-
- **Phi-3** (3.8B-14B)
|
|
263
|
-
- **Gemma-2** (2B-27B)
|
|
264
|
-
|
|
265
|
-
## Platform Support
|
|
266
|
-
|
|
267
|
-
| Platform | Architecture | Status |
|
|
268
|
-
|----------|--------------|--------|
|
|
269
|
-
| macOS | arm64 (M1-M4) | ✅ Full support |
|
|
270
|
-
| macOS | x64 | ✅ Supported |
|
|
271
|
-
| Linux | x64 | ✅ Supported |
|
|
272
|
-
| Linux | arm64 | ✅ Supported |
|
|
273
|
-
| Windows | x64 | ✅ Supported |
|
|
274
|
-
|
|
275
|
-
## Related Packages
|
|
276
|
-
|
|
277
|
-
- [@ruvector/core](https://www.npmjs.com/package/@ruvector/core) - Vector operations
|
|
278
|
-
- [@ruvector/sona](https://www.npmjs.com/package/@ruvector/sona) - SONA learning engine
|
|
279
|
-
- [@ruvector/ruvector](https://www.npmjs.com/package/@ruvector/ruvector) - Full Ruvector SDK
|
|
280
|
-
|
|
281
|
-
## Links
|
|
282
|
-
|
|
283
|
-
- [GitHub Repository](https://github.com/ruvnet/ruvector)
|
|
284
|
-
- [API Documentation](https://docs.rs/ruvllm)
|
|
285
|
-
- [Crate (Rust)](https://crates.io/crates/ruvllm)
|
|
286
|
-
|
|
287
|
-
## License
|
|
288
|
-
|
|
289
|
-
MIT OR Apache-2.0
|
|
168
|
+
Tests require the built native binary. In restricted agent environments the Node
|
|
169
|
+
test runner, native child processes and package fetching may require the host's
|
|
170
|
+
supported execution permission. Verify actual subtest counts; a file-only runner
|
|
171
|
+
summary is insufficient evidence. Do not disable TLS/checksums or native checks.
|
|
172
|
+
|
|
173
|
+
The benchmark compares fresh versus reused Node processes on identical CPU
|
|
174
|
+
fixtures, retaining raw latency samples and implementation/binary/lock hashes.
|
|
175
|
+
The reused process matches the MCP server architecture. All native hashing,
|
|
176
|
+
patch validation and byte restoration remain enabled. See the
|
|
177
|
+
[benchmark report](../../docs/benchmarks/metaharness-cpu.md) for measured scope
|
|
178
|
+
and limits; no model-performance claim follows from orchestration speed.
|
|
179
|
+
|
|
180
|
+
Architecture and threat boundaries are recorded in
|
|
181
|
+
[ADR 012](../../docs/adr/ADR-012-metaharness-bounded-experiment-runner.md),
|
|
182
|
+
[ADR 013](../../docs/adr/ADR-013-training-and-development-selection.md) and
|
|
183
|
+
[ADR 014](../../docs/adr/ADR-014-claude-ruflo-integration.md).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "ruvllm-gpu-loop/v1",
|
|
3
|
+
"stateRoot": "/absolute/private/gpu-loop-state",
|
|
4
|
+
"intervalSeconds": 60,
|
|
5
|
+
"maxAttempts": 2,
|
|
6
|
+
"budgetUsd": 0,
|
|
7
|
+
"jobs": [
|
|
8
|
+
{
|
|
9
|
+
"id": "qwen35-4b-paired-evaluation",
|
|
10
|
+
"provider": "vast.ai",
|
|
11
|
+
"model": {
|
|
12
|
+
"repo": "Qwen/Qwen3.5-4B",
|
|
13
|
+
"revision": "851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a"
|
|
14
|
+
},
|
|
15
|
+
"task": "evaluate",
|
|
16
|
+
"secretRef": "ruos.vast.primary",
|
|
17
|
+
"resource": { "instanceId": "REPLACE_WITH_EXISTING_INSTANCE_ID" },
|
|
18
|
+
"maxCostUsd": 1,
|
|
19
|
+
"timeoutSeconds": 1800,
|
|
20
|
+
"experiment": {
|
|
21
|
+
"configPath": "/absolute/private/operator-profile/runtime.json",
|
|
22
|
+
"planPath": "/absolute/experiment-inputs/plan.json"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|