Run this model with HF Jobs

Run Frankenstein-Labs/cortex.6.sol on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Frankenstein-Labs/cortex.6.sol. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Frankenstein-Labs/cortex.6.sol on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Frankenstein-Labs/cortex.6.sol. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Frankenstein-Labs/cortex.6.sol. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
openhands openhands commited on
Commit
6fbe100
·
1 Parent(s): e1985ae

feat(cortex): add CORTEX training pipeline and model audit

Browse files

Frankenstein-Labs' own CORTEX weights need a training pipeline. This adds one,
strictly separate from the distributed 1.65T checkpoint, which no script here
reads or modifies.

Pipeline:
- model/cortex_model.py decoder-only Transformer (RMSNorm, RoPE, GQA, SwiGLU)
- model/init.py weight init and checkpoint I/O
- tokenizer/ loads the shipped tokenizer, validates vocab_size
- training/train.py training loop with a dataset licence gate
- datasets/ code datasets with declared source and licence
- evaluation/evaluate.py loss, perplexity, generation
- configs/cortex/ cortex-dev-1, ~174,803,712 params

Correctness details found while building it:
- safetensors refuses to save storage-sharing keys, which tied embeddings are.
The tied matrix is stored once, aliased in provenance.json, and re-expanded
on load, so checkpoints stay lossless.
- Cross-entropy over full 129280-wide fp32 logits restarted the sandbox, so the
softmax is computed in 8192-row chunks.
- The tokenizer exposes 129283 counters but 129280 unique ids (ids 0/1/2 appear
in both the BPE vocab and the added tokens). Tests compare unique ids.

Verified: 28 pipeline tests pass, including an overfit test asserting loss falls.
A 20-step CPU run on real CodeAlpaca data drops loss 11.31 -> 9.01. A checkpoint
is written with a SHA-256 manifest, and a corrupted one is rejected on load.

Not verified: no long training run (4 CPU cores, no GPU), and no code-generation
quality is claimed. Evaluation at step 6 reports perplexity ~67k and 0 exact
matches, as measured.

Provenance is unchanged: the 66 shards are untouched, base_model stays null in
CORTEX checkpoints, and the MIT attribution for the distributed weights remains.
docs/architecture-modele.fr.md records the measured architecture.

Co-authored-by: openhands <openhands@all-hands.dev>

26 files changed +3060 -7
Files changed (26)
.gitignore+3-1
AGENTS.md+44-6
README.md+54
checkpoints/README.mdAdded+40
configs/cortex/cortex-dev-1.jsonAdded+79
datasets/README.mdAdded+73
datasets/build.pyAdded+148
datasets/cortex-code-eval.jsonlAdded
The diff for this file is too large to render. See raw diff
datasets/cortex-code-eval.meta.jsonAdded+18
datasets/cortex-code-sft.jsonlAdded+200
datasets/cortex-code-sft.meta.jsonAdded+18
datasets/cortex-code-tests.jsonlAdded+200
datasets/cortex-code-tests.meta.jsonAdded+18
datasets/registry.jsonAdded+97
docs/architecture-modele.fr.mdAdded+272
docs/pipeline-cortex.fr.mdAdded+113
evaluation/README.mdAdded+41
evaluation/evaluate.pyAdded+123
model/README.mdAdded+67
model/cortex_model.pyAdded+335
model/init.pyAdded+214
tests/test_cortex_pipeline.pyAdded+322
tokenizer/README.mdAdded+53
tokenizer/cortex_tokenizer.pyAdded+67
training/README.mdAdded+60
training/train.pyAdded+237