Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_5
qwen
qwen3.8
cortex
cortexlm
post-training
vision-language
conversational
preview
Instructions to use CortexLM/Cortex-Mini-1-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CortexLM/Cortex-Mini-1-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="CortexLM/Cortex-Mini-1-Preview") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("CortexLM/Cortex-Mini-1-Preview") model = AutoModelForMultimodalLM.from_pretrained("CortexLM/Cortex-Mini-1-Preview", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CortexLM/Cortex-Mini-1-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CortexLM/Cortex-Mini-1-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/Cortex-Mini-1-Preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/CortexLM/Cortex-Mini-1-Preview
- SGLang
How to use CortexLM/Cortex-Mini-1-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/Cortex-Mini-1-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/Cortex-Mini-1-Preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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/Cortex-Mini-1-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/Cortex-Mini-1-Preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use CortexLM/Cortex-Mini-1-Preview with Docker Model Runner:
docker model run hf.co/CortexLM/Cortex-Mini-1-Preview
File size: 6,920 Bytes
7377655 | 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | ---
license: apache-2.0
license_name: apache-2.0
license_link: https://www.apache.org/licenses/LICENSE-2.0
library_name: transformers
pipeline_tag: image-text-to-text
language:
- en
- zh
base_model: Qwen/Qwen3.8-27B
base_model_relation: finetune
tags:
- qwen
- qwen3.8
- cortex
- cortexlm
- post-training
- vision-language
- conversational
- preview
---
<p align="center">
<img src="banner.jpg" alt="Cortex" width="100%" />
</p>
# Cortex-Mini-1-Preview
**Cortex-Mini-1-Preview** is a post-trained derivative of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B), released by [CortexLM](https://huggingface.co/CortexLM).
This repository is a fork of the official Qwen3.8-27B checkpoint. We start from that open-weight native vision-language model and continue with Cortex post-training (Relearn). The goal is to improve the model on held-out tasks **without** collapsing general capability or overfitting public eval splits.
> Preview. Weights, training recipe, and numbers in this card will move. Treat this page as the public home for the Cortex Mini 1 line, not a frozen release.
## Thanks
This work exists because the Qwen team open-sourced [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) under Apache 2.0.
Thank you to the **Qwen Team** and **Alibaba Cloud** for the architecture, the training, the weights, and the docs. Cortex-Mini-1-Preview inherits their model; our contribution is post-training on top. If you use this checkpoint, please also cite Qwen3.8 (see [Citation](#citation)).
## What this is
| | |
|---|---|
| Base | [`Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B) |
| Relation | Post-training / continued training (`finetune`) |
| Type | Native vision-language causal LM (text, image, video) |
| Parameters | 27B dense |
| License | Apache License 2.0 (same as the base) |
| Org | [CortexLM](https://huggingface.co/CortexLM) |
Qwen3.8-27B already accepts image and video input. Cortex-Mini-1-Preview does **not** bolt on a separate vision encoder. Miners and researchers post-train this 27B checkpoint itself.
## License
The base model is licensed under **Apache License 2.0**, Copyright 2026 Alibaba Cloud. That license allows commercial use, modification, and redistribution, including this fork.
This repository redistributes Qwen3.8-27B weights and configuration as a derivative work:
- The Apache 2.0 license text ships with the repo (`LICENSE`).
- Attribution to the Qwen Team / Alibaba Cloud is retained (this card + `NOTICE`).
- Files we change are marked as such. The model card, banner, and Cortex post-training artifacts are new.
You must keep the license, attribution, and NOTICE if you redistribute further. "Qwen" remains a trademark of the original authors; this project does not claim that mark.
Full terms: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) and the `LICENSE` file in this repo.
## Model overview (inherited from Qwen3.8-27B)
These architectural facts come from the [Qwen3.8-27B model card](https://huggingface.co/Qwen/Qwen3.8-27B). Cortex post-training does not change the network shape.
- **Type:** Causal language model with vision encoder (native VLM)
- **Training stage (base):** Pre-training and post-training by Qwen
- **Training stage (this repo):** Additional Cortex post-training on the Qwen checkpoint
- **Parameters:** 27B
- **Hidden size:** 5120
- **Layers:** 64
- **Context:** 262,144 tokens natively, extensible to 1,000,000 with YaRN
- **Modalities:** Text, image, video
For serving details, sampling defaults, thinking mode, and YaRN flags, follow the Qwen card. Those recipes still apply.
## Intended use
- Research and development on Cortex Relearn (post-train a capable open VLM without wrecking general skills).
- Downstream chat, coding, agent, and vision-language workloads that already run on Qwen3.8-27B.
- Further fine-tuning under Apache 2.0.
**Out of scope**
- Do not present this preview as a drop-in Qwen Cloud / Qwen3.8-Max replacement.
- Do not treat unpublished scores as Qwen's official numbers.
- Do not strip license or attribution.
## How to use
Load the repo id once weights are in place:
```python
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "CortexLM/Cortex-Mini-1-Preview"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True,
)
```
For production serving, use vLLM, SGLang, or TokenSpeed with the **local directory** of the downloaded weights, not a guessed path. See Qwen's [vLLM recipe](https://recipes.vllm.ai/Qwen/Qwen3.8-27B) and [SGLang cookbook](https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-27B).
Thinking mode is on by default in the Qwen3.8 stack (`enable_thinking`, `preserve_thinking`, `reasoning_effort`). Keep those defaults unless you know you want instruct/non-thinking sampling.
## Evaluation
Preview: we do not publish a public leaderboard on this card yet. Cortex scores live training on a **private holdout**. Public splits are informational. General-capability checks run off the visible reward so they are not an overfitting target.
When a numbered release ships, this section will get frozen metrics and the eval recipe.
## Limitations
- Preview checkpoint: APIs, tokenizer extras, and chat template can still change.
- Post-training can move behavior away from the Qwen defaults (style, refusal, tool use). Compare against [`Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B) before you swap it in.
- Long-context and hour-scale video settings are inherited from Qwen; we have not re-tuned those knobs here.
- As with any open VLM, outputs can be wrong, biased, or unsafe. You are responsible for downstream filters.
## Files of ours vs Qwen's
| File | Source |
|---|---|
| Weights, tokenizer, `config.json`, processor configs | Forked from Qwen/Qwen3.8-27B |
| `LICENSE` | Apache 2.0 from the base (Copyright 2026 Alibaba Cloud) |
| `README.md`, `banner.jpg`, `NOTICE` | CortexLM |
## Citation
If you use Cortex-Mini-1-Preview, please cite both this work and Qwen3.8:
```bibtex
@misc{cortex-mini-1-preview,
title = {Cortex-Mini-1-Preview},
author = {CortexLM},
year = {2026},
url = {https://huggingface.co/CortexLM/Cortex-Mini-1-Preview}
}
@misc{qwen38,
title = {{Qwen3.8-Max}: A New Bar for Coding and Cowork},
url = {https://qwen.ai/blog?id=qwen3.8},
author = {{Qwen Team}},
month = {August},
year = {2026}
}
```
## Links
- Base model: [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)
- Qwen collection: [Qwen3.8 on Hugging Face](https://huggingface.co/collections/Qwen/qwen38)
- CortexLM: [huggingface.co/CortexLM](https://huggingface.co/CortexLM)
- Cortex: [github.com/CortexLM/cortex](https://github.com/CortexLM/cortex)
|