tjarvis91 commited on
Commit
d3f92cf
Β·
verified Β·
1 Parent(s): 22a8107

Initial release: q-coder sovereign specialist

Browse files
Files changed (2) hide show
  1. README.md +71 -65
  2. release.json +2 -2
README.md CHANGED
@@ -19,66 +19,68 @@ tags:
19
 
20
  # Q-Coder-50M-Sovereign β€” Python code one-liners + small function skeletons
21
 
22
- ## Proprietary Qovaryx technology β€” built on our own scratch base
23
-
24
- This is a **53.5M-parameter sovereign specialist** in the Qovaryx Compact
25
- Specialist Suite. It is full-fine-tuned from
26
- [`tjarvis91/qovaryx-50m-scratch-base`](https://huggingface.co/tjarvis91/qovaryx-50m-scratch-base) β€”
27
- **our own scratch-trained base, not a borrowed foundation model**.
28
-
29
- - **Base:** Qovaryx 50M scratch base. Pretrained from random initialization on
30
- 491.5M tokens of curated text. **Not SmolLM2. Not Qwen. Not Llama. Not Mistral. Not Phi.**
31
- No HuggingFace base. No closed-source weights. Every parameter in this checkpoint
32
- traces back to a Qovaryx training run on Qovaryx hardware.
33
- - **Tokenizer:** Qovaryx english_v1 BPE (vocab 32000), built in-house against our
34
- pretraining corpus. **Not the SmolLM2 tokenizer. Not the Llama tokenizer.**
35
- - **Architecture:** Qovaryx FinanceDecoder β€” 12 decoder blocks, GQA, RoPE,
36
- SwiGLU FFN, RMSNorm, MTP heads, decision head. Designed in the Bleeding Edge
37
- research line for compact local-sovereign cognition.
38
- - **Recipe:** Qovaryx crystallization corpus discipline β€” train the law before
39
- replaying the noise. See the [public research devlog](https://github.com/thron-j/qovaryx-ai-research)
40
- for the architectural framing.
41
- - **Runs on CPU.** No GPU required at inference.
42
-
43
- The entire stack β€” base, tokenizer, model class, training recipe, eval gate,
44
- crystal corpus β€” is Qovaryx proprietary technology. The decision to publish
45
- the **weights and the audit** under Apache 2.0 is deliberate; the build pipeline
46
- and the corpus stay private.
47
 
48
- ## What this is
49
 
50
  Given a short natural-language Python task, returns the smallest correct Python expression or function that solves it. Trained on aggregate ops (sum/min/max/len/avg over named lists), string ops (reverse/upper/lower/title/palindrome), list comprehensions (even/odd/positive/squares/doubles), dict .get(default), small function definitions, try/except wrappers, class skeletons, and basic file I/O. Designed for fast structured code emission, not free-form programming.
51
 
52
- ## What this is NOT
53
-
54
- - **Not a general-purpose chatbot.** This head does one job. Free-text generation outside
55
- the trained task surface is not supported and will degrade.
56
- - **Not reproducible from scratch.** The crystal corpus, the eval gate
57
- constants, and the training hyperparameters are intentionally not published.
58
- - **Not a replacement for a verifier.** This is one component in the
59
- Qovaryx [cluster-shell](https://github.com/thron-j/qovaryx-ai-research)
60
- architecture. The decision-acceptance discipline lives in the wrapper, not
61
- in the head.
62
-
63
  ## Honest performance
64
 
65
  - **Task:** compact Python code generation
66
  - **Metric:** `exact_match` (string-equal after strip + lowercase)
67
- - **Holdout:** n=53 (date-disjoint, never seen in training)
68
  - **Score:** **100.0%** mean
69
  - **Bootstrap CI 95% lower bound:** 1.000
70
  - **Gate threshold:** 0.90
71
- - **Verdict:** PASS at both point estimate and CI lower bound
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  ## Example
74
 
 
 
 
75
  ```
76
- USER: Define a function `square` that returns x squared.
77
 
78
- ASSISTANT: def square(x):
 
 
79
  return x * x
80
  ```
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  ## Architecture (Qovaryx proprietary)
83
 
84
  - 53.5M parameters
@@ -87,12 +89,10 @@ ASSISTANT: def square(x):
87
  - Multi-token prediction (MTP) auxiliary heads
88
  - Decision head for routed-decision tasks
89
  - Tokenizer: Qovaryx `english_v1` BPE, vocab 32000 (in-house build)
90
- - Pretrained from `qovaryx-50m-scratch-base` step 60000 β€” 491.5M tokens, our scratch
91
- lineage from random initialization
92
- - Full fine-tune (no LoRA, no QLoRA, no adapter): every parameter was updated
93
- on the Qovaryx crystal corpus for this specialist
94
 
95
- ## How to use
96
 
97
  ```python
98
  import torch
@@ -101,8 +101,7 @@ from bleeding_edge.model.decoder import FinanceDecoder, DecoderConfig
101
 
102
  tok = Tokenizer.from_file("tokenizer.json")
103
  ckpt = torch.load("pytorch_model.pt", map_location="cpu", weights_only=False)
104
- cfg = DecoderConfig(**{k: v for k, v in ckpt["model_cfg"].items()
105
- if k in DecoderConfig.__dataclass_fields__})
106
  cfg.vocab_size = tok.get_vocab_size()
107
  model = FinanceDecoder(cfg).eval()
108
  state = {k.removeprefix("_orig_mod."): v for k, v in ckpt["model_state"].items()}
@@ -112,35 +111,42 @@ prompt = "Define a function `square` that returns x squared."
112
  ids = tok.encode(prompt).ids
113
  cur = torch.tensor([ids], dtype=torch.long)
114
  with torch.no_grad():
115
- for _ in range(80):
116
  nxt = int(torch.argmax(model(cur, return_decision=False).logits[:, -1, :], dim=-1))
117
  if nxt == 0: break
118
  cur = torch.cat([cur, torch.tensor([[nxt]])], dim=1)
119
  print(tok.decode(cur[0].tolist()[len(ids):]))
120
  ```
121
 
122
- The `bleeding_edge` package is open-source at
123
- [github.com/thron-j/qovaryx-ai-research](https://github.com/thron-j/qovaryx-ai-research)
124
- (architecture notes only; full source ships with the Qovaryx runtime).
125
-
126
  ## License & posture
127
 
128
  Apache 2.0 for the published weights, model card, and example code.
129
 
130
- The Qovaryx scratch base, the crystallization corpus, the eval gate constants,
131
- the cluster routing policy, and the training pipeline are **Qovaryx proprietary
132
- technology** and are not included in this release. This is the same posture as
133
- the rest of the Qovaryx public catalog: ship the weights and the audit, not
134
- the recipe.
135
 
136
- ## Sibling specialists
137
 
138
- The other heads in the Qovaryx Compact Specialist Suite share the same base
139
- and audit discipline. See the
140
- [Qovaryx research devlog](https://github.com/thron-j/qovaryx-ai-research)
141
- for the full cluster framing.
 
 
 
 
 
142
 
143
  ## Watermark
144
 
145
- This release carries a SHA256 issue fingerprint inside `model_cfg._qovaryx_watermark`
146
- for tamper-detection and attribution. See `release.json` for the canonical record.
 
 
 
 
 
 
 
 
 
19
 
20
  # Q-Coder-50M-Sovereign β€” Python code one-liners + small function skeletons
21
 
22
+ > **Python task in. Smallest correct expression out. No fences. No prose.**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ ## What this model does, in one sentence
25
 
26
  Given a short natural-language Python task, returns the smallest correct Python expression or function that solves it. Trained on aggregate ops (sum/min/max/len/avg over named lists), string ops (reverse/upper/lower/title/palindrome), list comprehensions (even/odd/positive/squares/doubles), dict .get(default), small function definitions, try/except wrappers, class skeletons, and basic file I/O. Designed for fast structured code emission, not free-form programming.
27
 
 
 
 
 
 
 
 
 
 
 
 
28
  ## Honest performance
29
 
30
  - **Task:** compact Python code generation
31
  - **Metric:** `exact_match` (string-equal after strip + lowercase)
32
+ - **Holdout:** n=53 rows, never seen in training, scored row-by-row
33
  - **Score:** **100.0%** mean
34
  - **Bootstrap CI 95% lower bound:** 1.000
35
  - **Gate threshold:** 0.90
36
+ - **Verdict:** PASS at point estimate AND at bootstrap CI lower bound
37
+
38
+ ## What it's used for β€” real workflows
39
+
40
+ - **Inline boilerplate emitter for IDEs** β€” Wire Q-Coder into an editor extension; ask 'reverse a string', get back 's[::-1]'. The point isn't autocomplete β€” it's deterministic emission of the small idioms you'd otherwise type.
41
+ - **Notebook one-liner generator** β€” Quick prompts in a notebook: 'sum of values', 'filter positives from nums'. Q-Coder returns the one-liner ready to paste.
42
+ - **Snippet expansion in chat ops** β€” Slack/Discord bot: 'qcoder def add' returns the canonical add(a,b). Cheap, deterministic, on-prem.
43
+ - **Test-skeleton generation** β€” Ask for a class skeleton with __init__ + a method; get a clean Python class body to fill in.
44
+
45
+ ## What problem this actually solves
46
+
47
+ Coding LMs are usually trained to generate sprawling, fence-wrapped, explanation-heavy code. Q-Coder is the opposite: tight expressions for tight tasks, no markdown, no chat, no fences. Use it as the focused emission step inside a bigger workflow.
48
+
49
+ ## Integration paths
50
+
51
+ - **Editor snippet engine** β€” Wire to a VS Code / JetBrains extension as a code-snippet generator.
52
+ - **Q-Office-Suite runtime** β€” POST /run/q-coder with the natural-language task.
53
+ - **Pair with Q-SheetExtract** β€” Q-SheetExtract gives you fields; Q-Coder gives you the expression that computes whatever aggregate you actually wanted.
54
 
55
  ## Example
56
 
57
+ Input:
58
+ ```
59
+ Define a function `square` that returns x squared.
60
  ```
 
61
 
62
+ Output:
63
+ ```
64
+ def square(x):
65
  return x * x
66
  ```
67
 
68
+ ## What this is NOT
69
+
70
+ - **Not a general-purpose chatbot.** This head does one job and does it consistently. Free-text generation outside the trained task surface will degrade.
71
+ - **Not a replacement for a verifier.** This is one component in the Qovaryx cluster-shell architecture. The decision-acceptance discipline lives in the wrapper, not in the head.
72
+ - **Not reproducible from this card.** Weights and audit are public; the crystal corpus, eval gate constants, and training hyperparameters are not.
73
+
74
+ ## Proprietary Qovaryx technology β€” built on our own scratch base
75
+
76
+ This is a **53.5M-parameter sovereign specialist** in the Qovaryx Compact Specialist Suite. It is full-fine-tuned from [`tjarvis91/qovaryx-50m-scratch-base`](https://huggingface.co/tjarvis91/qovaryx-50m-scratch-base) β€” **our own scratch-trained base, not a borrowed foundation model**.
77
+
78
+ - **Base:** Qovaryx 50M scratch base. Pretrained from random initialization on 491.5M tokens. **Not SmolLM2. Not Qwen. Not Llama. Not Mistral. Not Phi.** No HuggingFace foundation. No closed-source weights. Every parameter traces back to a Qovaryx training run on Qovaryx hardware.
79
+ - **Tokenizer:** Qovaryx `english_v1` BPE (vocab 32000), built in-house against our own pretraining corpus.
80
+ - **Architecture:** Qovaryx FinanceDecoder β€” 12 decoder blocks, GQA, RoPE, SwiGLU FFN, RMSNorm, MTP heads, decision head.
81
+ - **Recipe:** Qovaryx crystallization discipline β€” train the law before replaying the noise.
82
+ - **Runs on CPU.** No GPU required at inference.
83
+
84
  ## Architecture (Qovaryx proprietary)
85
 
86
  - 53.5M parameters
 
89
  - Multi-token prediction (MTP) auxiliary heads
90
  - Decision head for routed-decision tasks
91
  - Tokenizer: Qovaryx `english_v1` BPE, vocab 32000 (in-house build)
92
+ - Pretrained from `qovaryx-50m-scratch-base` step 60000 β€” 491.5M tokens
93
+ - Full fine-tune (no LoRA, no QLoRA, no adapter): every parameter was updated on the Qovaryx crystal corpus for this specialist
 
 
94
 
95
+ ## How to load it (Python)
96
 
97
  ```python
98
  import torch
 
101
 
102
  tok = Tokenizer.from_file("tokenizer.json")
103
  ckpt = torch.load("pytorch_model.pt", map_location="cpu", weights_only=False)
104
+ cfg = DecoderConfig(**{k: v for k, v in ckpt["model_cfg"].items() if k in DecoderConfig.__dataclass_fields__})
 
105
  cfg.vocab_size = tok.get_vocab_size()
106
  model = FinanceDecoder(cfg).eval()
107
  state = {k.removeprefix("_orig_mod."): v for k, v in ckpt["model_state"].items()}
 
111
  ids = tok.encode(prompt).ids
112
  cur = torch.tensor([ids], dtype=torch.long)
113
  with torch.no_grad():
114
+ for _ in range(120):
115
  nxt = int(torch.argmax(model(cur, return_decision=False).logits[:, -1, :], dim=-1))
116
  if nxt == 0: break
117
  cur = torch.cat([cur, torch.tensor([[nxt]])], dim=1)
118
  print(tok.decode(cur[0].tolist()[len(ids):]))
119
  ```
120
 
 
 
 
 
121
  ## License & posture
122
 
123
  Apache 2.0 for the published weights, model card, and example code.
124
 
125
+ The Qovaryx scratch base build pipeline, the crystallization corpus, the eval gate constants, the cluster routing policy, and the protected runtime entrypoint are **Qovaryx proprietary technology** and are not included in this release. Same posture as every previous Qovaryx public release: ship the weights and the audit, not the recipe.
126
+
127
+ ## Sibling specialists in the Qovaryx Q-Office-Suite
 
 
128
 
129
+ All nine specialists share the `qovaryx-50m-scratch-base` and the same audit discipline. Use one directly; use all nine through the cluster shell.
130
 
131
+ - [Q-Triage](https://huggingface.co/tjarvis91/Q-Triage-50M-Sovereign) β€” ticket routing
132
+ - [Q-DocCite](https://huggingface.co/tjarvis91/Q-DocCite-50M-Sovereign) β€” document citation
133
+ - [Q-Invoice](https://huggingface.co/tjarvis91/Q-Invoice-50M-Sovereign) β€” invoice extraction
134
+ - [Q-ToolCall](https://huggingface.co/tjarvis91/Q-ToolCall-50M-Sovereign) β€” agent tool-calls
135
+ - [Q-Meeting](https://huggingface.co/tjarvis91/Q-Meeting-50M-Sovereign) β€” meeting structuring
136
+ - [Q-FinCite](https://huggingface.co/tjarvis91/Q-FinCite-50M-Sovereign) β€” 10-K/10-Q citation
137
+ - [Q-CmdSafe](https://huggingface.co/tjarvis91/Q-CmdSafe-50M-Sovereign) β€” command safety triage
138
+ - [Q-SheetExtract](https://huggingface.co/tjarvis91/Q-SheetExtract-50M-Sovereign) β€” spreadsheet extraction
139
+ - [Q-Coder](https://huggingface.co/tjarvis91/Q-Coder-50M-Sovereign) β€” Python code skeletons
140
 
141
  ## Watermark
142
 
143
+ This release carries a SHA256 issue fingerprint inside `release.json` for tamper-detection and attribution.
144
+
145
+ ## Community & support
146
+
147
+ - **Research devlog:** https://github.com/thron-j/qovaryx-ai-research
148
+ - **Discord (Qovaryx community):** https://discord.gg/PtuHZDv5ju
149
+ - **Ko-fi (we cover GPU bills):** https://ko-fi.com/tjarvis91
150
+ - **Qovaryx options decoder runtime:** https://huggingface.co/Qovaryx/qovaryx-options-decoder-full-community
151
+
152
+ If you find a failure mode this card doesn't cover, open a discussion on this repo or come to the Discord β€” that's how the next crystal corpus gets written.
release.json CHANGED
@@ -13,8 +13,8 @@
13
  "issuer": "Qovaryx AI / Thomas Jarvis",
14
  "specialist": "q-coder",
15
  "release_id": "qovaryx-sovereign-2026-06-02",
16
- "released_at": "2026-06-02T08:35:45Z",
17
- "fingerprint": "4c167a5bdf82bb30a54056021790f74a852db0fff777f0b95daf19230166967a",
18
  "base_model": "tjarvis91/qovaryx-50m-scratch-base",
19
  "policy": "This checkpoint is a sovereign Qovaryx specialist. It is full-fine-tuned from qovaryx-50m-scratch-base. Redistribution allowed under Apache 2.0. Fingerprint is for downstream attribution and tamper-detection."
20
  }
 
13
  "issuer": "Qovaryx AI / Thomas Jarvis",
14
  "specialist": "q-coder",
15
  "release_id": "qovaryx-sovereign-2026-06-02",
16
+ "released_at": "2026-06-02T09:15:24Z",
17
+ "fingerprint": "9c7358dca71cf14e421adb5861dae0404800b931cd3ca8b6a3a8c283eb9d06d5",
18
  "base_model": "tjarvis91/qovaryx-50m-scratch-base",
19
  "policy": "This checkpoint is a sovereign Qovaryx specialist. It is full-fine-tuned from qovaryx-50m-scratch-base. Redistribution allowed under Apache 2.0. Fingerprint is for downstream attribution and tamper-detection."
20
  }