Skip to content

Support for Qwen/Qwen3-Embedding-8B #19

Description

@iilyak

The new /v1/embeddings doesn't work correctly with Qwen/Qwen3-Embedding-8B

While experimenting with pmetal SDK I noticed that embeddings produced by the Qwen/Qwen3-Embedding-8B are not correct. I used something along these lines.

let hidden = model.forward_hidden(&ids, None)?;
let pooled = pooling::pool(&hidden, &mask, mode)?;

Logs:

[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 12 into shape (1,12,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 12 into shape (1,12,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 12 into shape (1,12,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.

I wanted to debug wether it is related to my code or pmetal implementation. So I decided to try talkin to the http endpoint.

  1. Run with Qwen/Qwen3-Embedding-8B
    Command:
curl http://127.0.0.1:11436/v1/embeddings \
                                                -H "Content-Type: application/json" \
                                                -d '{
                                              "input": "Your text string here",
                                              "model": "qwen/Qwen3-Embedding-8B"
                                            }'
{"object":"list","data":[{"index":0,"object":"embedding","embedding":[0.0]}],"model":"qwen/Qwen3-Embedding-8B","usage":{"prompt_tokens":4,"total_tokens":4}}⏎

Logs:

pmetal serve --model qwen/Qwen3-Embedding-8B --port 11436 --max-seq-len 10000
2026-06-14T23:54:17.807772Z  INFO pmetal::commands::serve: Resolving model: qwen/Qwen3-Embedding-8B
2026-06-14T23:54:17.810629Z  INFO pmetal_hub::download: Model qwen/Qwen3-Embedding-8B found in cache: /Users/iilyak2/.cache/huggingface/hub/models--qwen--Qwen3-Embedding-8B/snapshots/1d8ad4ca9b3dd8059ad90a75d4983776a23d44af
2026-06-14T23:54:17.810713Z  INFO pmetal::commands::serve: Loading tokenizer...
2026-06-14T23:54:17.944139Z  INFO pmetal::commands::serve: Loading model from "/Users/iilyak2/.cache/huggingface/hub/models--qwen--Qwen3-Embedding-8B/snapshots/1d8ad4ca9b3dd8059ad90a75d4983776a23d44af"...
2026-06-14T23:54:18.124152Z  INFO pmetal::commands::serve: Model loaded successfully
2026-06-14T23:54:18.124389Z  INFO pmetal_data::chat_templates: Chat template: Qwen (from tokenizer_config.json, jinja attached)
2026-06-14T23:54:18.125667Z  INFO pmetal_serve::engine: Inference engine ready: model_id=qwen/Qwen3-Embedding-8B, stop_tokens=[151643, 151645]
2026-06-14T23:54:18.125755Z  INFO pmetal_serve::engine: Selected serving generation backend model=/Users/iilyak2/.cache/huggingface/hub/models--qwen--Qwen3-Embedding-8B/snapshots/1d8ad4ca9b3dd8059ad90a75d4983776a23d44af backend=Gpu ane_enabled=false ane_max_seq_len=1024 ane_real_time=false
2026-06-14T23:54:18.125990Z  INFO pmetal_serve::server: Starting PMetal inference server on 127.0.0.1:11436
2026-06-14T23:54:18.125997Z  INFO pmetal_serve::server: OpenAI-compatible API available at http://127.0.0.1:11436/v1
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
2026-06-14T23:56:27.147787Z  INFO pmetal_metal::context: Initialized Metal device: Apple M1 Max
2026-06-14T23:56:27.154771Z  INFO pmetal_metal::context: Loaded Metal library (606520 bytes, 103 kernels available)
2026-06-14T23:56:27.154983Z  INFO pmetal_metal::context: GPU: Apple7 Max (gen 14), 24 cores, 280 GB/s [MeasuredGpuCopy], NAX: false, ANE: 16 cores
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,32,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 4 into shape (1,4,8,128).
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [rms_norm]: [rms_norm] Input must have at least 1 dimension but got input with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [rope]: [rope] Input must have at least 3 dimensions but got input with 0 dimensions.
[pmetal-bridge] exception in [sdpa]: [scaled_dot_product_attention] input with shape () expected to be rank 4
[pmetal-bridge] exception in [transpose_axes]: [transpose] Recived 4 axes for array with 0 dimensions.
[pmetal-bridge] exception in [reshape]: [reshape] Cannot reshape array of size 1 into shape (1,4,4096).
[pmetal-bridge] exception in [matmul]: [matmul] Got 0 dimension input. Inputs must have at least one dimension.
  1. Run with qwen/Qwen3.5-9B
    Command:
curl http://127.0.0.1:11436/v1/embeddings \
                                                -H "Content-Type: application/json" \
                                                -d '{
                                              "input": "Your text string here",
                                              "model": "qwen/Qwen3-0.6B"
                                            }'
{"object":"list","data":[{"index":0,"object":"embedding","embedding":[1.4957438,-0.24979623,1.4551576,0.1484651,0.0921154,0.19227195,-2.0051706,0.29821873,-0.119668916,...]}],"model":"qwen/Qwen3.5-9B","usage":{"prompt_tokens":4,"total_tokens":4}}

Logs:

pmetal serve --model qwen/Qwen3.5-9B --port 11436 --max-seq-len 10000
2026-06-15T00:00:04.335651Z  INFO pmetal::commands::serve: Resolving model: qwen/Qwen3.5-9B
2026-06-15T00:00:04.335931Z  INFO pmetal_hub::download: Model qwen/Qwen3.5-9B found in cache: /Users/iilyak2/.cache/huggingface/hub/models--qwen--Qwen3.5-9B/snapshots/c202236235762e1c871ad0ccb60c8ee5ba337b9a
2026-06-15T00:00:04.335950Z  INFO pmetal::commands::serve: Loading tokenizer...
2026-06-15T00:00:04.507439Z  INFO pmetal::commands::serve: Loading model from "/Users/iilyak2/.cache/huggingface/hub/models--qwen--Qwen3.5-9B/snapshots/c202236235762e1c871ad0ccb60c8ee5ba337b9a"...
2026-06-15T00:00:04.519677Z  INFO pmetal_models::loader: Qwen3Next weight loading: all 427 weights matched successfully
2026-06-15T00:00:29.928358Z  INFO pmetal::commands::serve: Model loaded successfully
2026-06-15T00:00:29.929832Z  INFO pmetal_data::chat_templates: Chat template: Qwen (from tokenizer_config.json, jinja attached)
2026-06-15T00:00:29.930467Z  INFO pmetal_serve::engine: Inference engine ready: model_id=qwen/Qwen3.5-9B, stop_tokens=[248044, 248046]
2026-06-15T00:00:29.930809Z  INFO pmetal_serve::engine: Selected serving generation backend model=/Users/iilyak2/.cache/huggingface/hub/models--qwen--Qwen3.5-9B/snapshots/c202236235762e1c871ad0ccb60c8ee5ba337b9a backend=Gpu ane_enabled=false ane_max_seq_len=1024 ane_real_time=false
2026-06-15T00:00:29.930865Z  INFO pmetal_serve::server: Starting PMetal inference server on 127.0.0.1:11436
2026-06-15T00:00:29.930872Z  INFO pmetal_serve::server: OpenAI-compatible API available at http://127.0.0.1:11436/v1
2026-06-15T00:00:35.420999Z  INFO pmetal_metal::context: Initialized Metal device: Apple M1 Max
2026-06-15T00:00:35.427229Z  INFO pmetal_metal::context: Loaded Metal library (606520 bytes, 103 kernels available)
2026-06-15T00:00:35.427582Z  INFO pmetal_metal::context: GPU: Apple7 Max (gen 14), 24 cores, 280 GB/s [MeasuredGpuCopy], NAX: false, ANE: 16 cores

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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