Run this model with HF Jobs
Run hy35/Qwen3.8-27B-Vision on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/hy35/Qwen3.8-27B-Vision. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/hy35/Qwen3.8-27B-Vision on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use hy35/Qwen3.8-27B-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hy35/Qwen3.8-27B-Vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="hy35/Qwen3.8-27B-Vision")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("hy35/Qwen3.8-27B-Vision") model = AutoModel.from_pretrained("hy35/Qwen3.8-27B-Vision", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download examples/inference.py from hy35/Qwen3.8-27B-Vision: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/hy35/Qwen3.8-27B-Vision/resolve/main/examples/inference.py
- Command line
-
hf download hf://hy35/Qwen3.8-27B-Vision/examples/inference.py
-
curl -L -o inference.py https://huggingface.co/hy35/Qwen3.8-27B-Vision/resolve/main/examples/inference.py
1.15 kB
| import argparse | |
| from pathlib import Path | |
| from PIL import Image | |
| import torch | |
| from transformers import AutoImageProcessor, AutoModel | |
| MODEL_ID = "immanuelpeter/Qwen3.8-27B-Vision" | |
| def main() -> None: | |
| parser = argparse.ArgumentParser(description="Extract Qwen3.8 visual features.") | |
| parser.add_argument("image", type=Path) | |
| parser.add_argument("--model", default=MODEL_ID) | |
| args = parser.parse_args() | |
| device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |
| dtype = torch.bfloat16 if device.type == "cuda" else torch.float32 | |
| tower = AutoModel.from_pretrained(args.model, dtype=dtype).to(device).eval() | |
| processor = AutoImageProcessor.from_pretrained(args.model) | |
| inputs = processor(images=Image.open(args.image).convert("RGB"), return_tensors="pt") | |
| with torch.inference_mode(): | |
| output = tower( | |
| hidden_states=inputs["pixel_values"].to(device=device, dtype=dtype), | |
| grid_thw=inputs["image_grid_thw"].to(device), | |
| ) | |
| print("tower", output.last_hidden_state.shape) | |
| print("projected", output.pooler_output.shape) | |
| if __name__ == "__main__": | |
| main() | |