Skip to content

8B load problem #73

@LouisDong95

Description

@LouisDong95

2B ok, 8B not ok

hf download Qwen/Qwen3-VL-Embedding-8B --local-dir ./models/Qwen3-VL-Embedding-8B

class QwenVLEmbedding():
    def __init__(
            self,
            model_path = './models/Qwen3-VL-Embedding-8B',
            device="cuda:1"
    ):
        self.device = torch.device(device)
        self.model = Qwen3VLEmbedder(model_name_or_path=model_path, torch_dtype=torch.float16)  

File "/mnt/sdb/dsh/RelatedWorks/AgentDC/agent_qwen.py", line 131, in init
self.model = Qwen3VLEmbedder(model_name_or_path=model_path, torch_dtype=torch.float16)
File "/mnt/sdb/dsh/RelatedWorks/AgentDC/qwen3_vl_embedding.py", line 184, in init
self.model = Qwen3VLForEmbedding.from_pretrained(
File "/opt/anaconda/envs/torch2.0/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4109, in from_pretrained
load_info = cls._load_pretrained_model(model, state_dict, checkpoint_files, load_config)
File "/opt/anaconda/envs/torch2.0/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4218, in _load_pretrained_model
file_pointer = safe_open(file, framework="pt", device="cpu")
safetensors_rust.SafetensorError: Error while deserializing header: InvalidHeaderDeserialization

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions