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
File size: 1,865 Bytes
6fbe100 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # CORTEX — tokenizer
Le tokenizer CORTEX est **réutilisé tel quel** depuis le dépôt distribué
(`Frankenstein-Labs/Cortex-ai`), sous licence MIT. Il n'est ni reconstruit, ni modifié.
| Fichier | Rôle |
|---|---|
| `../tokenizer.json` | tokenizer distribué, à la racine du dépôt (BPE, 129 280 identifiants) |
| `cortex_tokenizer.py` | chargement et validation |
## Chiffres mesurés
| Propriété | Valeur |
|---|---|
| Classe | `PreTrainedTokenizerFast` |
| Modèle | BPE |
| Vocabulaire de base | 128 000 |
| Fusions | 127 741 |
| Tokens ajoutés | 1 283 |
| Identifiants uniques | **129 280** |
| Identifiants en doublon | 3 (ids 0, 1, 2) |
## Le piège du décompte
`128 000 + 1 283 = 129 283`, mais `config.json` déclare `vocab_size: 129280` et les
embeddings ont 129 280 lignes.
Ce n'est pas une incohérence : les identifiants 0, 1 et 2 (`bos`, `eos`, `pad`)
apparaissent **à la fois** comme tokens spéciaux ajoutés et comme entrées du vocabulaire
BPE. Le nombre d'identifiants **uniques** est bien 129 280.
C'est pourquoi `assert_vocab_matches_config()` compare les identifiants uniques et jamais
les compteurs bruts. Toute réutilisation de ce tokenizer doit faire de même.
## Exemple
```python
from tokenizer.cortex_tokenizer import load_tokenizer, assert_vocab_matches_config
tokenizer = load_tokenizer()
assert_vocab_matches_config(tokenizer, 129280)
print(tokenizer.decode(tokenizer.encode("def add(a, b):\n return a + b\n").ids))
```
## Si le fichier est absent
`tokenizer.json` est versionné **à la racine** du dépôt, et le pipeline le charge depuis là :
une seule copie existe, donc aucune divergence n'est possible entre le tokenizer du pipeline et
celui du checkpoint distribué. S'il manque, le récupérer depuis la source :
```bash
hf download Frankenstein-Labs/Cortex-ai tokenizer.json --local-dir .
```
|