Yi VL 34B Hf
This is the Huggingface version of Yi-VL-34B model.
Model source
- Kind
- Other
- File size
- 6.87–7.45 GB
- Version
- vRevision d1ce99b
- Updated
- Sep 26, 2026
- Downloads
- 18
- Source
- Hugging Face
Source excerpt
This is the Huggingface version of Yi-VL-34B model.
Sources
1 source
Sources
1 sourceVerified Aug 28
Download files
Model artifacts
9 artifacts
Model artifacts
9 artifactsmodel-00001-of-00009.safetensors
safetensors · 7.45 GB · SHA-256 987c22def7e5…04c0 · Hugging Face
Download shardmodel-00002-of-00009.safetensors
safetensors · 7.38 GB · SHA-256 81cfe88dbb99…456b · Hugging Face
Download shardmodel-00003-of-00009.safetensors
safetensors · 7.27 GB · SHA-256 9d35b95c05cd…a942 · Hugging Face
Download shardmodel-00004-of-00009.safetensors
safetensors · 7.27 GB · SHA-256 03a15b3234eb…2679 · Hugging Face
Download shardmodel-00005-of-00009.safetensors
safetensors · 7.27 GB · SHA-256 8bd2cad6aa42…8bce · Hugging Face
Download shardmodel-00006-of-00009.safetensors
safetensors · 7.27 GB · SHA-256 8552ff3840b9…d67e · Hugging Face
Download shardmodel-00007-of-00009.safetensors
safetensors · 7.27 GB · SHA-256 e10c30db1204…c1af · Hugging Face
Download shardmodel-00008-of-00009.safetensors
safetensors · 7.27 GB · SHA-256 e9eb5a2b1b34…b0bf · Hugging Face
Download shardmodel-00009-of-00009.safetensors
safetensors · 6.87 GB · SHA-256 a2c22d0ef903…fdc0 · Hugging Face
Download shardSource excerpts
2 excerpts
Source excerpts
2 excerpts--- library_name: transformers tags: - llama-factory - yi-vl - llava license: other language: - zh - en pipeline_tag: visual-question-answering --- This is the Huggingface version of [Yi-VL-34B](https://huggingface.co/01-ai/Yi-VL-34B) model. You may use this model for fine-tuning in downstream tasks, we recommend using our efficient fine-tuning toolkit. https://github.com/hiyouga/LLaMA-Factory - **Developed by:** [01-AI](https://www.01.ai/). - **Language(s) (NLP):** Chinese/English - **License:** [Yi Series Model License](https://huggingface.co/01-ai/Yi-VL-34B/blob/main/LICENSE) Usage: ```python import requests from PIL import Image import torch from transformers import AutoProcessor, AutoModelForVision2Seq, LlavaConfig import transformers from torch import nn class LlavaMultiModalProjectorYiVL(nn.Module): def __init__(self, config: "LlavaConfig"): super().__init__() self.linear_1 = nn.Linear(config.vision_config.hidden_size, config.text_config.hidden_size, bias=True) self.linear_2 = nn.LayerNorm(config.text_config.hidden_size, bias=True) self.linear_3 = nn.Linear(config.text_config.hidden_size, config.text_config.hidden_size, bias=True) self.linear_4 = nn.LayerNorm(config.text_config.hidden_size, bias=True) self.act = nn.GELU() def forward(self, image_features): hidden_states = self.linear_1(image_features) hidden_states = self.linear_2(hidden_states) hidden_states = self.act(hidden_states) hidden_states = self.linear_3(hidden_states) hidden_states = self.linear_4(hidden_states) return hidden_states # Monkey patch of LlavaMultiModalProjector is mandatory transformers.models.llava.modeling_llava.LlavaMultiModalProjector = LlavaMultiModalProjectorYiVL model_id = "BUAADreamer/Yi-VL-34B-hf" messages = [ { "role": "user", "content": "<image>What's in the picture?" } ] image_file = "http://images.cocodataset.org/val2017/000000039769.jpg" model = AutoModelForVision2Seq.from_pretrained( model_id, torch_dtype=torch.float16, low_cpu_mem_usage=True, ).to(0) processor = AutoProcessor.from_pretrained(model_id) text = [processor.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=False)] images = [Image.open(requests.get(image_file, stream=True).raw)] inputs = processor(text=text, images=images, return_tensors='pt').to(0, torch.float16) output = model.generate(**inputs, max_new_tokens=200) output = processor.bat...
Source context: 18 downloads · 5 likes · Pipeline visual-question-answering · Library transformers · Repo BUAADreamer/Yi-VL-34B-hf
