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
docs: note 256k-in continued training; keep default weights (math hold)
Browse files
README.md
CHANGED
|
@@ -34,13 +34,14 @@ base_model:
|
|
| 34 |
|
| 35 |
| Done in this preview | Still cooking |
|
| 36 |
| --- | --- |
|
| 37 |
-
| Long-context continued pretraining | More preference / alignment optimization |
|
| 38 |
| Supervised chat, thinking, and tools | Broader RL beyond math/code verifiers |
|
| 39 |
| RL on verifiable math (and code-oriented) rewards | Reliable **64k** free-form generation (in progress) |
|
| 40 |
| Long-output continuation (16k→32k response budgets) | Multimodal later |
|
| 41 |
-
| 256k
|
|
|
|
| 42 |
|
| 43 |
-
**Practical limits today:**
|
| 44 |
|
| 45 |
## How it was trained (high level)
|
| 46 |
|
|
@@ -138,9 +139,23 @@ print(resp.choices[0].message.content)
|
|
| 138 |
|
| 139 |
## Context & generation
|
| 140 |
|
| 141 |
-
- **Input capacity:** up to **256k** tokens (RoPE `max_position_embeddings=262144`)
|
| 142 |
- **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.
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
## Evaluation honesty
|
| 145 |
|
| 146 |
Internal math/reasoning probes improved substantially after verifiable-reward RL relative to the supervised merge. We **do not** claim contaminated public-bench SOTA (e.g. treat GSM8K-style numbers with caution). Prefer private or carefully decontaminated suites when comparing. Behavioural chat smokes (format, tools, basic instruction following) pass on this snapshot; broader alignment and preference quality are still in progress.
|
|
|
|
| 34 |
|
| 35 |
| Done in this preview | Still cooking |
|
| 36 |
| --- | --- |
|
| 37 |
+
| Long-context continued pretraining (up to 64k packs) | More preference / alignment optimization |
|
| 38 |
| Supervised chat, thinking, and tools | Broader RL beyond math/code verifiers |
|
| 39 |
| RL on verifiable math (and code-oriented) rewards | Reliable **64k** free-form generation (in progress) |
|
| 40 |
| Long-output continuation (16k→32k response budgets) | Multimodal later |
|
| 41 |
+
| **256k input** continued training (experimental; see below) | Merge long-ctx without math regression |
|
| 42 |
+
| 256k RoPE capacity retained on default weights | Multikey / hard long-ctx retrieval |
|
| 43 |
|
| 44 |
+
**Practical limits today:** default **weights** keep strong chat/math quality with RoPE capacity **256k**. A separate **256k-input continued-training** checkpoint exists (needle retrieval strong) but is **not** the default download yet — math quality dropped after that pass. Generation defaults target long answers (up to 64k in `generation_config`), but **stable 64k-out training is still underway**.
|
| 45 |
|
| 46 |
## How it was trained (high level)
|
| 47 |
|
|
|
|
| 139 |
|
| 140 |
## Context & generation
|
| 141 |
|
| 142 |
+
- **Input capacity (config):** up to **256k** tokens (RoPE `max_position_embeddings=262144`)
|
| 143 |
- **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.
|
| 144 |
|
| 145 |
+
## Long-context continued training (256k)
|
| 146 |
+
|
| 147 |
+
We completed an experimental **256k-input** continued-training curriculum (128k → 256k packs) after the chat/RL path. Results:
|
| 148 |
+
|
| 149 |
+
| Capability | Status |
|
| 150 |
+
| --- | --- |
|
| 151 |
+
| Single-needle retrieval @64k / 128k / 256k | Strong (pass rate **1.0** in internal needle smokes) |
|
| 152 |
+
| Multi-key needle @128k | **Weak** (~0.4) — follow-up recommended |
|
| 153 |
+
| Chat behaviour / tools format smoke | Holds (10/10 internal cases) |
|
| 154 |
+
| Verifiable math (internal private probe) | **Regressed** vs the default chat checkpoint — therefore **not** promoted to default weights |
|
| 155 |
+
| 64k free-form **output** training | Still **in progress** (orthogonal track) |
|
| 156 |
+
|
| 157 |
+
**Default weights on this repo** remain the stronger chat + math snapshot (FP8). The 256k-in experimental checkpoint lives in our training volume as `teutonic-ii-lc256k` (alias `teutonic-ii-longctx-256k`); a sibling 128k checkpoint is `teutonic-ii-lc128k`. We will publish a dedicated long-context weight drop only after math recovers (co-training / replay mix).
|
| 158 |
+
|
| 159 |
## Evaluation honesty
|
| 160 |
|
| 161 |
Internal math/reasoning probes improved substantially after verifiable-reward RL relative to the supervised merge. We **do not** claim contaminated public-bench SOTA (e.g. treat GSM8K-style numbers with caution). Prefer private or carefully decontaminated suites when comparing. Behavioural chat smokes (format, tools, basic instruction following) pass on this snapshot; broader alignment and preference quality are still in progress.
|