Text Generation
Transformers
Safetensors
French
English
Chinese
deepseek_v4
cortex
code-generation
web-development
software-engineering
Mixture of Experts
8-bit precision
fp8
Instructions to use Frankenstein-Labs/cortex.6.sol with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Frankenstein-Labs/cortex.6.sol with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Frankenstein-Labs/cortex.6.sol")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Frankenstein-Labs/cortex.6.sol") model = AutoModelForCausalLM.from_pretrained("Frankenstein-Labs/cortex.6.sol", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Frankenstein-Labs/cortex.6.sol with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Frankenstein-Labs/cortex.6.sol" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Frankenstein-Labs/cortex.6.sol", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Frankenstein-Labs/cortex.6.sol
- SGLang
How to use Frankenstein-Labs/cortex.6.sol with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Frankenstein-Labs/cortex.6.sol" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Frankenstein-Labs/cortex.6.sol", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Frankenstein-Labs/cortex.6.sol" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Frankenstein-Labs/cortex.6.sol", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Frankenstein-Labs/cortex.6.sol with Docker Model Runner:
docker model run hf.co/Frankenstein-Labs/cortex.6.sol
|
Download docs/pipeline-cortex.fr.md from Frankenstein-Labs/cortex.6.sol: direct link, hf CLI and curl.
- Browser
- Download file 4.33 kB
-
https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/docs/pipeline-cortex.fr.md
- Command line
-
hf download hf://Frankenstein-Labs/cortex.6.sol/docs/pipeline-cortex.fr.md
-
curl -L -o pipeline-cortex.fr.md https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/docs/pipeline-cortex.fr.md
4.33 kB
| # Pipeline CORTEX | |
| Ce dossier contient le pipeline qui produit les **propres poids CORTEX** de | |
| Frankenstein-Labs : définition du modèle, tokenizer, entraînement, datasets, | |
| checkpoints et évaluation. | |
| ## Règle de provenance | |
| Ce pipeline est **strictement séparé** du checkpoint de 1,65 T distribué dans ce dépôt. | |
| | | Checkpoint distribué | Poids produits par ce pipeline | | |
| |---|---|---| | |
| | Origine | `deepseek-ai/DeepSeek-V4-Pro-0813` | Frankenstein-Labs | | |
| | Entraînement | DeepSeek-AI | Frankenstein-Labs | | |
| | Fichiers | `model-0000*.safetensors` | `checkpoints/**` | | |
| | Licence | MIT (Copyright 2023 DeepSeek) | MIT | | |
| | Modifié par ce pipeline | **non** | — | | |
| Aucun script de ce dossier ne lit, ne modifie ni ne remplace les 66 shards distribués. | |
| `base_model` ne sera renseigné pour un checkpoint CORTEX que si ses poids dérivent | |
| réellement d'un autre modèle — ce qui n'est pas le cas des poids initialisés ici. | |
| ## Structure | |
| ```text | |
| model/ définition du modèle et entrées/sorties de checkpoints | |
| tokenizer/ chargement et validation du tokenizer CORTEX | |
| training/ boucle d'entraînement | |
| datasets/ datasets de code, avec traçabilité des sources et licences | |
| checkpoints/ checkpoints produits (non versionnés) | |
| evaluation/ évaluation : perte, perplexité, génération | |
| configs/cortex/ configurations d'entraînement | |
| ``` | |
| ## Démarrage rapide | |
| ```bash | |
| pip install torch safetensors tokenizers transformers numpy pytest | |
| # 1. Construire les datasets (traçabilité des licences incluse) | |
| python datasets/build.py --all --limit 200 | |
| # 2. Entraîner | |
| PYTHONPATH=. python3 -c " | |
| from training.train import train | |
| print(train('configs/cortex/cortex-dev-1.json', ['cortex-code-sft'], | |
| out_dir='checkpoints/dev', max_steps=100, device='cpu', progress=True)) | |
| " | |
| # 3. Évaluer | |
| PYTHONPATH=. python3 -c " | |
| import json | |
| from evaluation.evaluate import report | |
| print(json.dumps(report('checkpoints/dev/final'), indent=2)) | |
| " | |
| # 4. Tests de cohérence | |
| PYTHONPATH=. python3 -m pytest tests/test_cortex_pipeline.py -q | |
| ``` | |
| ## Configuration de développement | |
| `configs/cortex/cortex-dev-1.json` décrit un modèle **entraînable** : | |
| | Élément | Valeur | | |
| |---|---| | |
| | Paramètres | ~174,8 M | | |
| | Couches | 12 | | |
| | `hidden_size` | 768 | | |
| | Têtes d'attention | 12 (4 têtes KV) | | |
| | Contexte | 2 048 | | |
| | Vocabulaire | 129 280 (tokenizer CORTEX réutilisé) | | |
| | Précision | float32 | | |
| Le vocabulaire est repris du tokenizer CORTEX pour que les modèles de | |
| développement partagent le même espace de tokens que la distribution principale. | |
| ## État réel | |
| | Étape | État | | |
| |---|---| | |
| | Audit de l'architecture distribuée | fait — `docs/architecture-technique.fr.md` | | |
| | Définition du modèle | fait, testée | | |
| | Tokenizer | fait, validé contre `vocab_size` | | |
| | Initialisation et checkpoints | fait, testés (manifeste + SHA-256) | | |
| | Datasets avec licences | fait | | |
| | Boucle d'entraînement | fait, vérifiée sur CPU | | |
| | Entraînement complet | **non exécuté** — voir ci-dessous | | |
| | Remplacement des poids distribués | **non fait, et non prévu** | | |
| ### Ce qui a été mesuré | |
| - Les tests de `tests/test_cortex_pipeline.py` passent. | |
| - Un entraînement court sur CPU fait **baisser la perte** sur un corpus de code réel | |
| (CodeAlpaca), ce qui montre que le pipeline apprend réellement. | |
| - Un checkpoint est écrit, son manifeste est vérifié, et une corruption est détectée. | |
| ### Ce qui n'a pas été mesuré | |
| - Aucun entraînement long n'a été mené : l'environnement de développement dispose de | |
| 4 cœurs CPU, ~15 Gio de RAM et aucun GPU. Les étapes y prennent plusieurs dizaines de | |
| secondes, contre quelques millisecondes sur GPU. | |
| - Aucune qualité de génération de code n'est revendiquée pour l'instant. Un modèle de | |
| 175 M paramètres entraîné quelques centaines d'étapes ne produit pas de code fiable, | |
| et ce document ne prétend pas le contraire. | |
| ## Feuille de route | |
| 1. Entraîner `cortex-dev-1` sur GPU jusqu'à convergence, et publier les courbes réelles. | |
| 2. Ajouter une évaluation d'exécution (pass@k) sur les tests MBPP, en sandbox. | |
| 3. Passer à une échelle intermédiaire (~1 B) une fois le pipeline validé. | |
| 4. Ne toucher à `base_model` et à la présentation publique que lorsque des poids CORTEX | |
| réellement entraînés le justifient. | |