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
| license: apache-2.0 | |
| base_model: Altworld/Astrea-R8-Chat-9B | |
| base_model_relation: quantized | |
| pipeline_tag: image-text-to-text | |
| library_name: transformers | |
| language: | |
| - en | |
| tags: | |
| - qwen3.5 | |
| - chat | |
| - creative-writing | |
| - altworld | |
| - fp8 | |
| - compressed-tensors | |
| # Altworld Astrea R8 Chat 9B — FP8 | |
| This is the portable FP8 release of | |
| [Altworld/Astrea-R8-Chat-9B](https://huggingface.co/Altworld/Astrea-R8-Chat-9B), | |
| Altworld's open 9B creative-writing and chat model. | |
| **[Try Astrea](https://chat.altworld.io)** · | |
| **[API](https://altworld.io/developer)** · | |
| **[Documentation](https://astrea.altworld.io/docs/)** | |
| The checkpoint uses LLM Compressor's `compressed-tensors` format and can be | |
| served directly by compatible versions of vLLM. It contains six safetensor | |
| shards totalling 11.09 GiB, compared with 17.53 GiB for the BF16 weights. | |
| ## Quantization | |
| The checkpoint was generated from the released merged BF16 model with: | |
| - LLM Compressor 0.12.0; | |
| - compressed-tensors 0.17.1; | |
| - `FP8_DYNAMIC`, using E4M3 weights and BF16 per-output-channel scales; | |
| - dynamic per-token FP8 activation quantization at inference time; | |
| - data-free round-to-nearest post-training quantization. | |
| All 248 two-dimensional language-model linear weights are stored in FP8. The | |
| following sensitive or non-linear components remain in BF16: | |
| - input token embeddings; | |
| - `lm_head`; | |
| - Qwen3.5 linear-attention convolution kernels; | |
| - the complete vision tower. | |
| No calibration or training dataset was used during conversion. | |
| ## Running with vLLM | |
| Use a recent vLLM release with `compressed-tensors` support and an accelerator | |
| with supported FP8 kernels: | |
| ```bash | |
| vllm serve Altworld/Astrea-R8-Chat-9B-FP8 \ | |
| --max-model-len 32768 \ | |
| --gpu-memory-utilization 0.90 | |
| ``` | |
| The quantization configuration is embedded in `config.json`; no separate | |
| `--quantization` argument should be necessary. | |
| Recommended sampling for writing: | |
| ```json | |
| { | |
| "temperature": 0.8, | |
| "min_p": 0.025, | |
| "repetition_penalty": 1.08 | |
| } | |
| ``` | |
| Use `temperature: 0.2` for ordinary factual chat. The bundled chat template | |
| works without a system prompt and defaults to hidden thinking. | |
| ## Validation | |
| Before upload, this artifact passed the following local checks: | |
| - every original tensor is present with the expected shape; | |
| - all 248 targeted weights are E4M3 with matching BF16 channel scales; | |
| - all excluded components retain their original BF16 dtype; | |
| - the sharded safetensor index exactly matches all 1,008 stored tensors; | |
| - `AutoConfig`, `AutoTokenizer`, and `AutoProcessor` load successfully; | |
| - `Qwen3_5ForConditionalGeneration` loads the compressed checkpoint and | |
| completes a text-generation smoke test. | |
| The local Transformers smoke test dequantizes weights for its CPU fallback and | |
| therefore does not measure FP8 serving speed. Quantization changes model | |
| numerics, so applications should evaluate this checkpoint on their own prompts | |
| before replacing the BF16 release. Quant-specific Altworldbench results are not | |
| claimed on this card. | |
| ## Model quality and limitations | |
| See the [BF16 model card](https://huggingface.co/Altworld/Astrea-R8-Chat-9B) | |
| for training lineage, benchmark methodology, samples, usage guidance, and | |
| limitations. In particular: | |
| - Astrea is text-first; inherited vision behavior was not part of its release | |
| evaluation; | |
| - English dominates training and evaluation; | |
| - outputs can be confidently wrong and must not be treated as authoritative in | |
| high-stakes settings. | |
| ## License | |
| Apache-2.0, matching the source model. See `LICENSE` and `NOTICE`. | |