Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
qwen3.5
chat
creative-writing
altworld
fp8
compressed-tensors
conversational
Instructions to use Altworld/Astrea-R8-Chat-9B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Altworld/Astrea-R8-Chat-9B-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Altworld/Astrea-R8-Chat-9B-FP8") 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("Altworld/Astrea-R8-Chat-9B-FP8") model = AutoModelForMultimodalLM.from_pretrained("Altworld/Astrea-R8-Chat-9B-FP8", 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 Altworld/Astrea-R8-Chat-9B-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Altworld/Astrea-R8-Chat-9B-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Altworld/Astrea-R8-Chat-9B-FP8", "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/Altworld/Astrea-R8-Chat-9B-FP8
- SGLang
How to use Altworld/Astrea-R8-Chat-9B-FP8 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 "Altworld/Astrea-R8-Chat-9B-FP8" \ --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": "Altworld/Astrea-R8-Chat-9B-FP8", "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 "Altworld/Astrea-R8-Chat-9B-FP8" \ --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": "Altworld/Astrea-R8-Chat-9B-FP8", "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 Altworld/Astrea-R8-Chat-9B-FP8 with Docker Model Runner:
docker model run hf.co/Altworld/Astrea-R8-Chat-9B-FP8
Upload portable FP8 release
Browse files
README.md
CHANGED
|
@@ -1,3 +1,111 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: Altworld/Astrea-R8-Chat-9B
|
| 4 |
+
base_model_relation: quantized
|
| 5 |
+
pipeline_tag: image-text-to-text
|
| 6 |
+
library_name: transformers
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
tags:
|
| 10 |
+
- qwen3.5
|
| 11 |
+
- chat
|
| 12 |
+
- creative-writing
|
| 13 |
+
- altworld
|
| 14 |
+
- fp8
|
| 15 |
+
- compressed-tensors
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# Altworld Astrea R8 Chat 9B — FP8
|
| 19 |
+
|
| 20 |
+
This is the portable FP8 release of
|
| 21 |
+
[Altworld/Astrea-R8-Chat-9B](https://huggingface.co/Altworld/Astrea-R8-Chat-9B),
|
| 22 |
+
Altworld's open 9B creative-writing and chat model.
|
| 23 |
+
|
| 24 |
+
**[Try Astrea](https://chat.altworld.io)** ·
|
| 25 |
+
**[API](https://altworld.io/developer)** ·
|
| 26 |
+
**[Documentation](https://astrea.altworld.io/docs/)**
|
| 27 |
+
|
| 28 |
+
The checkpoint uses LLM Compressor's `compressed-tensors` format and can be
|
| 29 |
+
served directly by compatible versions of vLLM. It contains six safetensor
|
| 30 |
+
shards totalling 11.09 GiB, compared with 17.53 GiB for the BF16 weights.
|
| 31 |
+
|
| 32 |
+
## Quantization
|
| 33 |
+
|
| 34 |
+
The checkpoint was generated from the released merged BF16 model with:
|
| 35 |
+
|
| 36 |
+
- LLM Compressor 0.12.0;
|
| 37 |
+
- compressed-tensors 0.17.1;
|
| 38 |
+
- `FP8_DYNAMIC`, using E4M3 weights and BF16 per-output-channel scales;
|
| 39 |
+
- dynamic per-token FP8 activation quantization at inference time;
|
| 40 |
+
- data-free round-to-nearest post-training quantization.
|
| 41 |
+
|
| 42 |
+
All 248 two-dimensional language-model linear weights are stored in FP8. The
|
| 43 |
+
following sensitive or non-linear components remain in BF16:
|
| 44 |
+
|
| 45 |
+
- input token embeddings;
|
| 46 |
+
- `lm_head`;
|
| 47 |
+
- Qwen3.5 linear-attention convolution kernels;
|
| 48 |
+
- the complete vision tower.
|
| 49 |
+
|
| 50 |
+
No calibration or training dataset was used during conversion.
|
| 51 |
+
|
| 52 |
+
## Running with vLLM
|
| 53 |
+
|
| 54 |
+
Use a recent vLLM release with `compressed-tensors` support and an accelerator
|
| 55 |
+
with supported FP8 kernels:
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
vllm serve Altworld/Astrea-R8-Chat-9B-FP8 \
|
| 59 |
+
--max-model-len 32768 \
|
| 60 |
+
--gpu-memory-utilization 0.90
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
The quantization configuration is embedded in `config.json`; no separate
|
| 64 |
+
`--quantization` argument should be necessary.
|
| 65 |
+
|
| 66 |
+
Recommended sampling for writing:
|
| 67 |
+
|
| 68 |
+
```json
|
| 69 |
+
{
|
| 70 |
+
"temperature": 0.8,
|
| 71 |
+
"min_p": 0.025,
|
| 72 |
+
"repetition_penalty": 1.08
|
| 73 |
+
}
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
Use `temperature: 0.2` for ordinary factual chat. The bundled chat template
|
| 77 |
+
works without a system prompt and defaults to hidden thinking.
|
| 78 |
+
|
| 79 |
+
## Validation
|
| 80 |
+
|
| 81 |
+
Before upload, this artifact passed the following local checks:
|
| 82 |
+
|
| 83 |
+
- every original tensor is present with the expected shape;
|
| 84 |
+
- all 248 targeted weights are E4M3 with matching BF16 channel scales;
|
| 85 |
+
- all excluded components retain their original BF16 dtype;
|
| 86 |
+
- the sharded safetensor index exactly matches all 1,008 stored tensors;
|
| 87 |
+
- `AutoConfig`, `AutoTokenizer`, and `AutoProcessor` load successfully;
|
| 88 |
+
- `Qwen3_5ForConditionalGeneration` loads the compressed checkpoint and
|
| 89 |
+
completes a text-generation smoke test.
|
| 90 |
+
|
| 91 |
+
The local Transformers smoke test dequantizes weights for its CPU fallback and
|
| 92 |
+
therefore does not measure FP8 serving speed. Quantization changes model
|
| 93 |
+
numerics, so applications should evaluate this checkpoint on their own prompts
|
| 94 |
+
before replacing the BF16 release. Quant-specific Altworldbench results are not
|
| 95 |
+
claimed on this card.
|
| 96 |
+
|
| 97 |
+
## Model quality and limitations
|
| 98 |
+
|
| 99 |
+
See the [BF16 model card](https://huggingface.co/Altworld/Astrea-R8-Chat-9B)
|
| 100 |
+
for training lineage, benchmark methodology, samples, usage guidance, and
|
| 101 |
+
limitations. In particular:
|
| 102 |
+
|
| 103 |
+
- Astrea is text-first; inherited vision behavior was not part of its release
|
| 104 |
+
evaluation;
|
| 105 |
+
- English dominates training and evaluation;
|
| 106 |
+
- outputs can be confidently wrong and must not be treated as authoritative in
|
| 107 |
+
high-stakes settings.
|
| 108 |
+
|
| 109 |
+
## License
|
| 110 |
+
|
| 111 |
+
Apache-2.0, matching the source model. See `LICENSE` and `NOTICE`.
|