Qwen3-VL-235B-A22B-Instruct-int4-mixed-AutoRound
108
3
235.0B
—
by
Intel
Other
OTHER
235B params
New
108 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
526GB+ RAM
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Device Compatibility
Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
219GB+ RAM
Code Examples
Generate the modelpythontransformers
from tqdm import tqdm
from accelerate import init_empty_weights
from transformers import Qwen3VLMoeForConditionalGeneration, AutoProcessor, AutoConfig
model_name = "Qwen/Qwen3-VL-235B-A22B-Instruct"
model = Qwen3VLMoeForConditionalGeneration.from_pretrained(
model_name, dtype="auto", device_map="auto"
)
config = AutoConfig.from_pretrained(model_name)
orig_state_dict = model.state_dict()
model = model.to_empty(device="cpu")
keys = list(orig_state_dict.keys())
num_experts = config.text_config.num_experts
for key in tqdm(keys, desc="convert"):
if "gate_up_proj" in key and "expert" in key:
for i in range(num_experts):
new_key = key.replace("gate_up_proj","gate_up_projs")
new_key+="."+str(i)+".weight"
value = orig_state_dict[key][i,...].transpose(0, 1).contiguous()
orig_state_dict[new_key] = value
orig_state_dict[key] = None
orig_state_dict.pop(key)
elif "down_proj" in key and "expert" in key:
for i in range(num_experts):
new_key = key.replace("down_proj", "down_projs")
new_key += "." + str(i) + ".weight"
value = orig_state_dict[key][i, ...].transpose(0, 1).contiguous()
orig_state_dict[new_key] = value
orig_state_dict[key] = None
orig_state_dict.pop(key)
with init_empty_weights():
from modeling_qwen3_vl_moe import Qwen3VLMoeForConditionalGeneration
modify_model = Qwen3VLMoeForConditionalGeneration._from_config(config)
modelfied_state_dict = modify_model.state_dict()
modify_model.load_state_dict(orig_state_dict,strict=True,assign=True)
modify_model.to("cpu")
output_dir="Qwen3-VL-235B-A22B-Instruct-convert-linear"
modify_model.save_pretrained(output_dir)Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.