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
| 689f0c220c9b4e857f35ca7d0dca51397e5a545dc4ad3987438c023e24ff0ab6 LICENSE | |
| 34c5d6102ca9ac68f1a73fd90b8e6ca8744f4547ac917ba649f9d96433b418a2 NOTICE | |
| d2045e7cfd3bdef1e9582b1e6932f09892154ce1fbebd747de2a978e76673ed7 README.md | |
| d5ddb788d5f3df12e32244954037eb535409d24eeb48c2429d7588af4e7b69a7 chat_template.jinja | |
| fd9a0e4331af9938b4dbce26de0034b296568c0159ee90b0490abba658e56738 config.json | |
| b7227ea9915664112df8a51ec212f088d2642a3425fae44a5340b1d41673ab53 generation_config.json | |
| a9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d merges.txt | |
| 106ec926c62c1aac2c8ab808833db89012a9132c53f767fa7609ec69e377d4ab model-00001-of-00006.safetensors | |
| 10a562aeb0c18ea0d91ead69f25879056d5c2d6421365d70ee248fd45e5abd11 model-00002-of-00006.safetensors | |
| 0166705cd9b1aadd0e274b58cf3acbeb8cb5ea64339eecef9048753ea0a273aa model-00003-of-00006.safetensors | |
| ae3bd3c91d9151dc58b7e72ba8fc534e5bfdea1feef0dde16eb50898ff1c112c model-00004-of-00006.safetensors | |
| 2a4b603ab22e7adf2c18a313eae8d10c9b274f1978b98df12198116a28bfaaa5 model-00005-of-00006.safetensors | |
| 2655bbe792b8402e8d09e40283da5482e920e666f7c70266ba3e442f968b3da6 model-00006-of-00006.safetensors | |
| 17b0d034c9dd3d8cde7db2578c0194b8d0d8096517f882a5f1c696ef290a8c24 model.safetensors.index.json | |
| 27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516 preprocessor_config.json | |
| 5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42 tokenizer.json | |
| d1c3436eb93f605c0e8f32248a54c21a6e81135fdeb8ad57e327f48f678ce2a6 tokenizer_config.json | |
| 7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13 video_preprocessor_config.json | |
| ce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003 vocab.json | |