Skip to content

Error running Qwen3-VL-2B-Instruct-GPTQ-Int4-AX630C-P320-CTX448-maixcam2 in MaixVision #168

Description

@Impuls101

On https://wiki.sipeed.com/maixpy/doc/en/mllm/vlm_qwen3.html you present the code for running the model in section 3.3. Running that code in MaixVision with a connected MaixCAM2 leads to this error:

start running...

-- [I] [Maix Comm Protocol] auto set pinmap A21 to UART4_TX for uart4
-- [I] [Maix Comm Protocol] auto set pinmap A22 to UART4_RX for uart4
-- [I] [Maix Comm Protocol] listening on uart port: uart4(/dev/ttyS4)
-- [I] maix multi-media driver used count: 1
[SAMPLE-VO][SAMPLE_VO_WIN_INFO-334] Win-info: {1, 1, 480x640}
-- [I] u32BlkCnt = 4, u64BlkSize = 0x70800, pPoolID = 2

-- [I] init fb0 done

[SAMPLE-VO][SAMPLE_VO_WIN_INFO-334] Win-info: {1, 1, 480x640}
[SAMPLE-VO][SAMPLE_COMM_VO_StartChn-369] layer0 u32Width:480, u32Height:640
[SAMPLE-VO][SAMPLE_COMM_VO_StartVO-555] done, s32Ret = 0x0
-- [E] load model failed, key-value error in mud's post_config section
Traceback (most recent call last):
File "/tmp/maixpy_run/main.py", line 8, in
qwen3_vl = nn.Qwen3VL(model)
RuntimeError: Invalid arguments: load model /root/models/Qwen3-VL-2B-Instruct-GPTQ-Int4-AX630C-P320-CTX448-maixcam2/model.mud failed

-- [I] maix multi-media driver used count: 0, driver released.

program exit failed. exit code: 1.

And this code:

mud_path = "/root/models/Qwen3-VL-2B-Instruct-GPTQ-Int4-AX630C-P320-CTX448-maixcam2/model.mud"

with open(mud_path, 'r') as f:
    content = f.read()
    print(content)

leads to this output:

start running...

[basic]
type = axmodel
model_npu = Qwen3-VL-2B-Instruct-AX630C-c64_p320_ctx448-Int4/qwen3_vl_text_p64_l%d_together.axmodel
model_vnpu =

[extra]
model_type = qwen3-vl
input_cache = true
output_cache = true
model_num = 28
exec_app = main_ax630c_api
post_model = Qwen3-VL-2B-Instruct-AX630C-c64_p320_ctx448-Int4/qwen3_vl_text_post.axmodel
use_mmap_load_embed = 1
tokens_embed = Qwen3-VL-2B-Instruct-AX630C-c64_p320_ctx448-Int4/model.embed_tokens.weight.bfloat16.bin
tokens_embed_num = 151936
tokens_embed_size = 2048
patch_size = 16
context = true
tokenizer_url = http://127.0.0.1:12345
tokenizer_type = qwen3-vl
llm_service = qwen3_vl.service
llm_service_url = http://127.0.0.1:12346
service_env_path = /tmp/qwen3_vl.service.env
vpm_resampler_model = Qwen3-VL-2B-Instruct-AX630C-c64_p320_ctx448-Int4/Qwen3-VL-2B-Instruct_vision_u8_320_ax630c.axmodel
vpm_len = 100
img_w = 320
img_h = 320
vision_start_token_id = 151652
post_config_path = post_config.json

program exited

Can you fix this or do I seem to miss something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions