Skip to content

Releases: jascal/n-orca

v0.2.0 — JEPA / V-JEPA 2 / LeWorldModel world models

Choose a tag to compare

@jascal jascal released this 30 May 03:32
1ccdb84

Highlights

Adds first-class support for JEPA-family joint-embedding world models (#1).

New JepaAdapter

Convert V-JEPA 2, I-JEPA, and LeWorldModel checkpoints to verified .n.orca.md:

n-orca hf convert facebook/vjepa2-vitl-fpc64-256 --out vjepa2.n.orca.md --mermaid vjepa2.mmd
n-orca hf convert quentinll/lewm-pusht --out lewm-pusht.n.orca.md
  • Normalizes the flat HF transformers config (V-JEPA 2 / I-JEPA, pred_* fields) and the nested Hydra config (LeWorldModel, matched structurally — no model_type) into one encoder → predictor DAG.
  • Dual latent outputs (encoder_latents, predicted_latents) share the encoder's embedding space; an output_shape invariant enforces latent-dim consistency.
  • Optional additive action conditioning and projector head. Mask tokens, the EMA stop-gradient target, SIGReg, and rotary/sincos positions are captured as verification rules.

New ops

  • TubeletEmbed (Conv3d, video) and PatchEmbed (Conv2d, image) patch embedders — shape inference + param counting that matches PyTorch exactly.

CLI

  • n-orca hf download --include-processor also fetches preprocessor_config.json / video_preprocessor_config.json (V-JEPA ships the latter).

Examples

  • examples/hf-generated/vjepa2.n.orca.md (V-JEPA 2 ViT-L, 326M params) and lewm-pusht.n.orca.md (action-conditioned), each with a matching .mmd.

Tests

  • 140 passing (+22): new ops, dispatch incl. structural LeWM detection, verify, parser round-trip, Mermaid, and torch forward passes.

Full diff: v0.1.0...v0.2.0

n-orca v0.1.0

Choose a tag to compare

@jascal jascal released this 23 May 18:59

n-orca v0.1.0 — initial release

A Markdown DSL for declaring, verifying, visualizing, and executing neural network architectures. Sibling to orca-lang (state machines) and q-orca-lang (quantum circuits).

Install

pip install n-orca                # core
pip install "n-orca[torch]"       # + PyTorch (compile to runnable nn.Module)
pip install "n-orca[hf]"          # + huggingface_hub
pip install "n-orca[mcp]"         # + MCP server for Claude Code
pip install "n-orca[all]"         # everything

What's in 0.1.0

Language + tooling

  • Parser, 5-stage verifier (naming → structural → shape → resource → op), ~30-op standard library
  • Compilers to Mermaid flowchart TD and runnable PyTorch nn.Module
  • Round-trip emit→parse→verify is exact

Hugging Face integration

  • n-orca hf {search,info,download,convert} CLI surface
  • Adapters for GPT-2, LLaMA family (LLaMA / Mistral / Qwen / Gemma / Phi), BERT family (BERT / RoBERTa / DistilBERT / Electra / ALBERT), and ESM-2
  • Reads config.json only — no model code is executed, no trust_remote_code

Sparse autoencoders

  • n_orca.sae.{topk_sae, l1_sae, jumprelu_sae} programmatic builders
  • New ops: TopK(k) and JumpReLU(d, theta_init)

Non-LLM world models (econ-sae substrates)

  • n_orca.world_models.{world_model, deep_world_model, attn_world_model}

MCP server

  • 10 tools: list_architectures, hf_search, hf_info, convert_from_hf, verify_markdown, compile_mermaid, compile_pytorch, render_markdown, build_sae, build_world_model
  • claude mcp add n-orca <python> -m n_orca.mcp_server

Test status

111 tests passing on Python 3.10 / 3.11 / 3.12 (parser, verifier, ops, builders, Mermaid + PyTorch compilers, CLI, MCP stdio protocol, end-to-end forward passes).

What's not in 0.1.0

  • Whisper-style encoder-decoder topologies
  • Mixture-of-experts FFN
  • Optional --collapse-repeat rendering for very deep architectures (LLaMA-7B / BERT renders are correct but one tall column)