Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
06d1380
specs: plan the configurable base model (RFC phases 2-5)
Oct 19, 2026
33ecadc
modernbert: add the encoder family structure crate
Oct 19, 2026
1d2d956
laya: split the execution plan into a pure builder
Oct 19, 2026
0e6eaea
laya: run the encoder on the modernbert family core
Oct 19, 2026
48863a4
qwen3_5: split structure parsing from the ABI-6 capability gate
Oct 19, 2026
0397892
vela: add the 2.0 0.3B ModernBERT profile crate
Oct 19, 2026
d27fa12
cuda: add the 768-hidden ModernBERT profile to the laya bundle, ABI 2
Oct 20, 2026
d57cbe5
vela: execute the 0.3B encoder on the regenerated bundle
Oct 20, 2026
b08c136
specs: drop the local model-config planning series
Oct 20, 2026
889958b
vela: freeze oracle fixtures and compare endpoints with the reference
Oct 20, 2026
f598f17
modernbert: own the bundle dialects in the model crates
Oct 20, 2026
3426893
qwen3_5: assert the structure ABI matches the loaded library
Oct 20, 2026
93624ff
vela: rustfmt the executor buffer writes
Oct 20, 2026
e8b058a
vela: refuse every importable suffix in package verification
Oct 20, 2026
7227fc8
vela: validate token ids before the embedding launch
Oct 20, 2026
f828d17
modernbert: reject a zero global attention interval
Oct 20, 2026
f013512
vela: reconcile the worker with the #151 review head
Oct 20, 2026
6bfbd71
modernbert: fall back to the generic rope_theta key
Oct 20, 2026
dcc6dac
vela: refuse the type scratch slot instead of aliasing the ids buffer
Oct 20, 2026
5745213
Merge upstream/main into model/configurable-base-model
Oct 22, 2026
80a30e1
Merge upstream/main into model/configurable-base-model
Oct 22, 2026
28187c8
vela: refuse existing bytecode caches at the package gate
Oct 23, 2026
8d7be88
vela: keep bytecode writing off for the recipe's runtime imports
Oct 24, 2026
0139cb1
Merge upstream/main into model/configurable-base-model
Oct 25, 2026
b023c7f
Merge upstream/main into model/configurable-base-model
Oct 26, 2026
91b2f41
Merge upstream/main into model/configurable-base-model
Oct 31, 2026
022c62a
vela: restore the file-less runtime module guard the last merge dropped
Oct 31, 2026
90a1bef
Merge current main into Vela ModernBERT CPU acceptance branch
psv666 Nov 20, 2026
a11335a
modernbert: reject zero attention heads before deriving geometry
psv666 Nov 20, 2026
1c9e4cc
refactor(vela): give the ModernBERT encoder its own carrier
psv666 Nov 20, 2026
10d94f6
merge: integrate delivered Vela encoder and decoder carriers
psv666 Nov 20, 2026
9298359
docs(vela): document the two carrier entry points and CPU checks
psv666 Nov 20, 2026
6e1584a
docs(modernbert): point to the encoder carrier after relocation
psv666 Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
members = ["src/frontend", "src/runtime", "src/models/clm", "src/models/cua_s1/native", "src/models/qwen3_5/native", "src/models/open_jev/native", "src/models/jev_vl/native", "src/models/omnijev/native", "src/models/laya", "src/backends/cuda", "src/models/decider/native", "src/models/jemm/native", "src/models/startlux/native", "src/models/clef/native", "src/models/kev/native", "src/models/vela/native"]
members = ["src/frontend", "src/runtime", "src/models/clm", "src/models/cua_s1/native", "src/models/qwen3_5/native", "src/models/open_jev/native", "src/models/jev_vl/native", "src/models/omnijev/native", "src/models/laya", "src/models/modernbert", "src/models/vela/encoder_native", "src/backends/cuda", "src/models/decider/native", "src/models/jemm/native", "src/models/startlux/native", "src/models/clef/native", "src/models/kev/native", "src/models/vela/native"]
resolver = "3"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ repository root.
| [`docs/`](docs/) | Project documentation and architecture assets. |

The frontend, native runtime, the native workers, their shared Qwen3.5/3.8
prefill implementation and the Laya CUDA backend are Cargo workspace members.
prefill implementation, the ModernBERT family structure crate, the Vela native
profile crate and the Laya CUDA backend are Cargo workspace members.
Each model and backend documents its implementation and process boundary.

## Getting Started
Expand Down
88 changes: 81 additions & 7 deletions recipe/vela/compare_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
response construction to the same pinned code — so the criterion is
reference parity: exact match, including JSON key order, with
rejections agreeing on status and body (``{"detail": [{"loc", "msg",
"type"}]}``). ``--export`` additionally freezes the oracle fixture —
request, SystemOne response and the predict()-level answers — for the
future native encoder slices, and writes it only after a passing,
non-rejected comparison. Requires the pinned package, the reference
dependencies, and fastapi+uvicorn+httpx; see recipe/vela/reference.md.
"type"}]}``). The run also compares the worker's verbatim endpoint
bodies (``/health``, ``/ready``, ``/v1/models`` and the unauthorized
401) against the live reference app. ``--export`` additionally freezes
the oracle fixture — request, SystemOne response, the predict()-level
answers and the generating run's provenance — for the future native
encoder slices, and writes it only after a passing, non-rejected
comparison. Requires the pinned package, the reference dependencies,
and fastapi+uvicorn+httpx; see recipe/vela/reference.md.

The default fixture set is the recipe's four example requests plus
five synthetic rejections: an invalid span question (whole-request
Expand Down Expand Up @@ -237,17 +240,56 @@ def compare_case(name, worker, reference):
return lines, False


def endpoint_parity(client, gated, worker_endpoints, unauthorized_body, probe_body):
"""Compare the worker's verbatim endpoint bodies with the live reference app.

``worker_endpoints`` maps the reference app's GET routes to the exact
bodies the worker serves; ``gated`` is a reference app built with an
API key, so an unauthorized POST must answer the worker's 401 body.
A drift in either direction fails the run. Returns report lines and
the failure count.
"""

lines = []
failures = 0
for path, expected in worker_endpoints:
response = client.get(path)
observed = response.json()
if response.status_code != 200 or observed != expected:
failures += 1
lines.append(
f"endpoint {path}: FAIL: HTTP {response.status_code} "
f"{json.dumps(observed, ensure_ascii=False)[:160]} != the worker's "
f"{json.dumps(expected, ensure_ascii=False)[:160]}"
)
else:
lines.append(f"endpoint {path}: HTTP 200, exact body match: PASS")
response = gated.post("/v1/systemone", json=probe_body)
observed = response.json()
if response.status_code != 401 or observed != unauthorized_body:
failures += 1
lines.append(
f"unauthorized POST: FAIL: HTTP {response.status_code} "
f"{json.dumps(observed, ensure_ascii=False)[:160]} != the worker's "
f"{json.dumps(unauthorized_body, ensure_ascii=False)[:160]}"
)
else:
lines.append("unauthorized POST: 401, exact body match: PASS")
return lines, failures


def export_allowed(ok, worker):
"""The oracle freezes served 200 responses, never a rejection."""

return ok and worker[0] == 200


def export_oracle(name, body, response, predict, path):
def export_oracle(name, body, response, predict, path, source):
"""Freeze one passing case for the future native encoder slices."""

oracle = {
"case": name,
"source": source,
"request": body,
"system_one": response,
"predict": predict,
Expand Down Expand Up @@ -276,8 +318,25 @@ def main(argv=None):
finally:
sys.dont_write_bytecode = previous_dont_write_bytecode

from frontend.vela import HEALTH_BODY, MODELS_ENTRY, READY_BODY, UNAUTHORIZED_BODY

app = vela2_serve.create_app(executor.engine, model_name=executor.model_name, api_key=None)
client = TestClient(app)
gated = TestClient(
vela2_serve.create_app(executor.engine, model_name=executor.model_name, api_key="parity-key")
)
source = {
"model": executor.model_name,
"device": args.device,
"generator": "recipe/vela/compare_reference.py --export",
}
# A well-formed probe body: any answer other than the worker's 401
# means the reference's key gate drifted, not the probe itself.
unauthorized_probe = {
"model": executor.model_name,
"state": "short",
"questions": {"q": {"type": "noul", "instructions": "any?"}},
}
served = executor.model_name
# The decoder members share one runtime, so their oracle fixtures
# carry the member's label: every frozen baseline lives in one
Expand All @@ -290,6 +349,21 @@ def main(argv=None):
exported = 0
failed = 0
try:
endpoint_lines, endpoint_failures = endpoint_parity(
client,
gated,
[
("/health", HEALTH_BODY),
("/ready", READY_BODY),
("/v1/models", {"models": [{**MODELS_ENTRY, "name": executor.model_name}]}),
],
UNAUTHORIZED_BODY,
unauthorized_probe,
)
print("endpoint parity:")
print("\n".join(endpoint_lines))
print()
failed += endpoint_failures
for name, body in load_cases(args.fixture, served):
raw = json.dumps(body).encode("utf-8")
worker = worker_response(raw, executor, decide)
Expand All @@ -303,7 +377,7 @@ def main(argv=None):
target = Path(args.export)
if target.is_dir():
target = target / f"{prefix}{name}.json"
export_oracle(name, body, worker[1], executor.engine.predict(req), target)
export_oracle(name, body, worker[1], executor.engine.predict(req), target, source)
exported += 1
print()
finally:
Expand Down
7 changes: 7 additions & 0 deletions recipe/vela/native.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Vela 2.0 decoder native library

This recipe belongs to `omni-vela-native` at
[`src/models/vela/native/`](../../src/models/vela/native/). The 0.3B
encoder uses the separate
[`omni-vela-encoder-native`](../../src/models/vela/encoder_native/README.md)
carrier and the shared ModernBERT core. Both packages are registered in
the same workspace; their APIs and hardware gates remain separate.

The native implementation for the Vela 2.0 decoder members
([0.8B](https://huggingface.co/vllm-sr/Vela-2.0-0.8B), 4B, 9B — one
program, member-parameterized): the exported-bundle gate, the wire
Expand Down
11 changes: 6 additions & 5 deletions recipe/vela/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ Scope:
continuation (decoder members),
calibrated readouts; zero generated tokens.

Out of scope: the ONNX backend of
the 0.3B, any native Rust/CUDA executor (the decoder members' native
library is documented separately in [native.md](native.md)), and
`noul_calibration` (off by default; documented as a reference-server
feature only).
Out of scope for this reference-worker recipe: the ONNX backend of
the 0.3B, native Rust/CUDA execution, and `noul_calibration` (off by
default; documented as a reference-server feature only). Native work
has separate carriers: the 0.3B ModernBERT profile is
[`omni-vela-encoder-native`](../../src/models/vela/encoder_native/README.md),
while the decoder members use [`omni-vela-native`](native.md).

## Architecture and ownership

Expand Down
70 changes: 63 additions & 7 deletions recipe/vela/test_compare_reference.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python3
"""Regression tests for recipe/vela/compare_reference.py.

Checks the pure comparison, case-loading and export helpers without the
pinned package, weights, torch or fastapi: exact-match verdicts
including key order, rejection agreement, the default fixture set's
shape (the invalid-span 422 and over-limit 413 synthetic cases), the
oracle export gate, and the oracle export structure.
Checks the pure comparison, case-loading, endpoint-parity and export
helpers without the pinned package, weights, torch or fastapi:
exact-match verdicts including key order, rejection agreement, the
default fixture set's shape (the invalid-span 422 and over-limit 413
synthetic cases), the oracle export gate, and the oracle export
structure.

python recipe/vela/test_compare_reference.py
"""
Expand Down Expand Up @@ -139,18 +140,73 @@ def check(name: str, condition: bool, detail: str = "") -> None:
json.dumps(over)[:120],
)

# 4. The oracle export freezes the full native-comparison surface.
# 4. Endpoint parity fails only on a real body or status drift.
class FakeResponse:
def __init__(self, status_code, body):
self.status_code = status_code
self._body = body

def json(self):
return self._body

class FakeClient:
def __init__(self, gets, post=None):
self._gets = gets
self._post = post

def get(self, path):
return self._gets[path]

def post(self, path, json=None):
return self._post

health = {"status": "ok"}
models = {"models": [{"name": tool.MODEL_NAME}]}
endpoints = [("/health", health), ("/v1/models", models)]
unauthorized = {"detail": "Missing or invalid API key"}
probe = {"model": tool.MODEL_NAME, "state": "s", "questions": {}}

same = FakeClient(
{"/health": FakeResponse(200, dict(health)), "/v1/models": FakeResponse(200, {"models": [{"name": tool.MODEL_NAME}]})},
post=FakeResponse(401, dict(unauthorized)),
)
lines, failures = tool.endpoint_parity(same, same, endpoints, unauthorized, probe)
check(
"endpoint parity passes on exact bodies",
failures == 0 and lines[0].endswith("PASS") and lines[1].endswith("PASS")
and lines[2].endswith("PASS"),
"\n".join(lines),
)

drifted = FakeClient(
{"/health": FakeResponse(200, {"status": "degraded"}), "/v1/models": FakeResponse(200, {"models": [{"name": "other"}]})},
post=FakeResponse(401, {"detail": "different"}),
)
lines, failures = tool.endpoint_parity(drifted, drifted, endpoints, unauthorized, probe)
check("endpoint body drift fails", failures == 3, "\n".join(lines))

wrong_status = FakeClient(
{"/health": FakeResponse(503, dict(health)), "/v1/models": FakeResponse(200, {"models": [{"name": tool.MODEL_NAME}]})},
post=FakeResponse(401, dict(unauthorized)),
)
lines, failures = tool.endpoint_parity(wrong_status, wrong_status, endpoints, unauthorized, probe)
check("endpoint status drift fails", failures == 1, "\n".join(lines))

# 5. The oracle export freezes the full native-comparison surface.
body = {"model": tool.MODEL_NAME, "state": "s",
"questions": {"q": {"type": "noul", "instructions": "x"}}}
source = {"model": tool.MODEL_NAME, "device": "cpu",
"generator": "recipe/vela/compare_reference.py --export"}
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "oracle.json"
oracle = tool.export_oracle(
"case", body, response(), {"answers": [{"id": "q", "type": "choice"}]}, path
"case", body, response(), {"answers": [{"id": "q", "type": "choice"}]}, path, source
)
reread = json.loads(path.read_text(encoding="utf-8"))
check(
"oracle export round-trips",
oracle == reread
and oracle["source"] == source
and oracle["request"] == body
and oracle["system_one"]["answers"]["q"]["noul"] == 0.75
and oracle["predict"]["answers"][0]["id"] == "q",
Expand Down
Loading