Text Generation
Transformers
Safetensors
English
qwen3_5_text
teutonic
cortexlm
chat
reasoning
hybrid-attention
fp8
long-context
conversational
Instructions to use CortexLM/Teutonic-1-Chat-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CortexLM/Teutonic-1-Chat-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CortexLM/Teutonic-1-Chat-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CortexLM/Teutonic-1-Chat-Preview") model = AutoModelForCausalLM.from_pretrained("CortexLM/Teutonic-1-Chat-Preview", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CortexLM/Teutonic-1-Chat-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CortexLM/Teutonic-1-Chat-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CortexLM/Teutonic-1-Chat-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CortexLM/Teutonic-1-Chat-Preview
- SGLang
How to use CortexLM/Teutonic-1-Chat-Preview 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 "CortexLM/Teutonic-1-Chat-Preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CortexLM/Teutonic-1-Chat-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "CortexLM/Teutonic-1-Chat-Preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CortexLM/Teutonic-1-Chat-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CortexLM/Teutonic-1-Chat-Preview with Docker Model Runner:
docker model run hf.co/CortexLM/Teutonic-1-Chat-Preview
Clarify default checkpoint already has strong needle @128k /256k; LC math-kill co-train not shipped
Browse files
README.md
CHANGED
|
@@ -31,6 +31,7 @@ base_model:
|
|
| 31 |
- Hybrid architecture (linear attention + softmax attention) in the Qwen3.5 text lineage
|
| 32 |
- Default weights: **FP8** (block-scaled `e4m3`, Qwen-style `quantization_config`) for efficient inference
|
| 33 |
- RoPE context capacity up to **256k** input tokens
|
|
|
|
| 34 |
- Chat template with optional `<think>…</think>` reasoning blocks and tool-calling tags
|
| 35 |
- Trained with continued long-context mid-training, supervised chat+thinking+tools, and RL on verifiable rewards
|
| 36 |
|
|
@@ -42,10 +43,10 @@ base_model:
|
|
| 42 |
| Supervised chat, thinking, and tools | Broader RL beyond math/code verifiers |
|
| 43 |
| RL on verifiable math (and code-oriented) rewards | Reliable **64k** free-form generation (in progress) |
|
| 44 |
| Long-output continuation (16k→32k response budgets) | Multimodal later |
|
| 45 |
-
| **256k
|
| 46 |
-
|
|
| 47 |
|
| 48 |
-
**Practical limits today:**
|
| 49 |
|
| 50 |
## How it was trained (high level)
|
| 51 |
|
|
@@ -144,21 +145,21 @@ print(resp.choices[0].message.content)
|
|
| 144 |
## Context & generation
|
| 145 |
|
| 146 |
- **Input capacity (config):** up to **256k** tokens (RoPE `max_position_embeddings=262144`)
|
|
|
|
| 147 |
- **Generation target:** moving toward **64k** free-form outputs; this preview is strongest at moderate-to-long answers (multi-k tokens). Treat 64k-out as aspirational until a later drop.
|
| 148 |
|
| 149 |
-
## Long-context
|
| 150 |
|
| 151 |
-
We
|
| 152 |
|
| 153 |
-
| Capability |
|
| 154 |
-
| --- | --- |
|
| 155 |
-
| Single-needle
|
| 156 |
-
| Multi-key needle @128k |
|
| 157 |
-
|
|
| 158 |
-
|
|
| 159 |
-
| 64k free-form **output** training | Still **in progress** (orthogonal track) |
|
| 160 |
|
| 161 |
-
**Default weights on this repo** remain the stronger chat + math
|
| 162 |
|
| 163 |
## Evaluation honesty
|
| 164 |
|
|
|
|
| 31 |
- Hybrid architecture (linear attention + softmax attention) in the Qwen3.5 text lineage
|
| 32 |
- Default weights: **FP8** (block-scaled `e4m3`, Qwen-style `quantization_config`) for efficient inference
|
| 33 |
- RoPE context capacity up to **256k** input tokens
|
| 34 |
+
- **Default checkpoint already shows strong long-context retrieval** in internal needle smokes (**1.0** single-needle @**128k** and @**256k**), alongside strong verifiable-math behavior
|
| 35 |
- Chat template with optional `<think>…</think>` reasoning blocks and tool-calling tags
|
| 36 |
- Trained with continued long-context mid-training, supervised chat+thinking+tools, and RL on verifiable rewards
|
| 37 |
|
|
|
|
| 43 |
| Supervised chat, thinking, and tools | Broader RL beyond math/code verifiers |
|
| 44 |
| RL on verifiable math (and code-oriented) rewards | Reliable **64k** free-form generation (in progress) |
|
| 45 |
| Long-output continuation (16k→32k response budgets) | Multimodal later |
|
| 46 |
+
| **256k RoPE** on default weights + strong single-needle @128k/256k (internal smokes) | Harder multikey / multi-hop long-ctx retrieval |
|
| 47 |
+
| Chat + math quality retained on the shipped snapshot | Further alignment / preference passes |
|
| 48 |
|
| 49 |
+
**Practical limits today:** the **default FP8 weights** are the chat + math snapshot (strong internal math + single-needle @128k/256k). A later **pure long-context co-train** that pushed harder on 256k packs improved needle-style retrieval but **collapsed thinking/math** — that experiment is **not shipped** here and will not be promoted without math recovery. Generation defaults target long answers (up to 64k in `generation_config`), but **stable 64k-out training is still underway**.
|
| 50 |
|
| 51 |
## How it was trained (high level)
|
| 52 |
|
|
|
|
| 145 |
## Context & generation
|
| 146 |
|
| 147 |
- **Input capacity (config):** up to **256k** tokens (RoPE `max_position_embeddings=262144`)
|
| 148 |
+
- **Long-context retrieval (default weights, internal smokes):** single-needle pass rate **1.0** at **128k** and **256k**
|
| 149 |
- **Generation target:** moving toward **64k** free-form outputs; this preview is strongest at moderate-to-long answers (multi-k tokens). Treat 64k-out as aspirational until a later drop.
|
| 150 |
|
| 151 |
+
## Long-context experiments (not shipped)
|
| 152 |
|
| 153 |
+
We also ran a **pure 256k-input continued-training** co-train after the chat/RL path (128k → 256k packs). That path kept strong needle retrieval but **broke thinking/math** (internal private math collapsed; model often never closed `</think>` even at large think budgets). **Those weights are not published** and are **not** candidates for promotion without a clear math recovery (≥ strong chat/math gate).
|
| 154 |
|
| 155 |
+
| Capability | Default weights (this repo) | Pure LC co-train (internal only) |
|
| 156 |
+
| --- | --- | --- |
|
| 157 |
+
| Single-needle @128k / @256k | **1.0** (internal smokes) | Strong (also ~1.0) |
|
| 158 |
+
| Multi-key needle @128k+ | Still cooking / uneven | Weak–mixed |
|
| 159 |
+
| Verifiable math (internal private probe) | **Strong** (~chat/RL quality) | **Regressed hard** — do not ship |
|
| 160 |
+
| 64k free-form **output** training | Still **in progress** | Orthogonal track |
|
|
|
|
| 161 |
|
| 162 |
+
**Default weights on this repo** remain the stronger chat + math + long-ctx retrieval snapshot (FP8). We will only publish a dedicated “harder long-ctx” weight drop if math stays ≥ the promotion gate after any further long-context work.
|
| 163 |
|
| 164 |
## Evaluation honesty
|
| 165 |
|