executorch icon indicating copy to clipboard operation
executorch copied to clipboard

On the same device (8295), Qwen3-0.6B and Qwen3-1.7B exhibit different CPU utilization, with Qwen3-0.6B showing higher CPU usage.

Open lansexinhu opened this issue 1 year ago • 12 comments

🚀 The feature, motivation and pitch

old version commit 763a4747b0f23d31a9b568d800954de928603ebd Qwen3-0.6B quan and convert setting as https://github.com/pytorch/executorch/issues/15410 seq_mse_candidates = 1000

run on the device 8295:--seq_len 1024 --kv_updater ShiftPointer

Tasks: 482 total, 1 running, 481 sleeping, 0 stopped, 0 zombie m12286 root 20 0 10G 27M 4.6M R 93.0 0.1 0:00.16 qnn_llama_runne+ m12286 root 20 0 10G 103M 5.1M R 60.0 0.4 0:01.09 qnn_llama_runne+ 12286 root 20 0 12G 1.0G 897M S 28.0 4.3 0:01.69 qnn_llama_runne+ m12286 root 20 0 12G 1.0G 897M R 28.0 4.3 0:01.97 qnn_llama_runne+ 12286 root 20 0 12G 1.0G 897M S 30.0 4.3 0:02.25 qnn_llama_runne+ m12286 root 20 0 12G 1.0G 897M R 28.0 4.3 0:02.55 qnn_llama_runne+ 12286 root 20 0 12G 1.0G 897M S 29.0 4.3 0:02.83 qnn_llama_runne+ m12286 root 20 0 12G 1.0G 897M R 28.0 4.3 0:03.12 qnn_llama_runne+ m12286 root 20 0 12G 1.0G 897M R 30.0 4.3 0:03.40 qnn_llama_runne+ m12286 root 20 0 12G 1.0G 897M R 30.0 4.3 0:03.70 qnn_llama_runne+ m12419 root 20 0 10G 10M 4.4M R 97.0 0.0 0:00.03 qnn_llama_runne+ m12419 root 20 0 10G 127M 5.1M R 65.0 0.5 0:01.00 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 28.0 4.3 0:01.65 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 26.0 4.3 0:01.93 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 28.0 4.3 0:02.19 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 27.0 4.3 0:02.47 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 26.0 4.3 0:02.74 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 27.0 4.3 0:03.00 qnn_llama_runne+ m12419 root 20 0 12G 1.0G 897M R 29.0 4.3 0:03.27 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 30.0 4.3 0:03.56 qnn_llama_runne+ 12419 root 20 0 12G 1.0G 897M S 27.0 4.3 0:03.86 qnn_llama_runne+ m12710 root 20 0 10G 84M 5.2M R 74.0 0.3 0:00.62 qnn_llama_runne+ m12710 root 20 0 11G 488M 433M R 54.0 1.9 0:01.36 qnn_llama_runne+ m12710 root 20 0 12G 1.0G 897M R 28.0 4.2 0:01.90 qnn_llama_runne+ m12710 root 20 0 12G 1.0G 897M R 26.0 4.3 0:02.18 qnn_llama_runne+ m12710 root 20 0 12G 1.0G 897M R 28.0 4.3 0:02.44 qnn_llama_runne+ m12710 root 20 0 12G 1.0G 897M R 26.0 4.3 0:02.72 qnn_llama_runne+ m12710 root 20 0 12G 1.0G 897M R 25.0 4.3 0:02.98 qnn_llama_runne+ 12710 root 20 0 12G 1.0G 897M S 29.0 4.3 0:03.23 qnn_llama_runne+ m12710 root 20 0 12G 1.0G 897M R 29.0 4.3 0:03.52 qnn_llama_runne+ m12873 root 20 0 10G 26M 4.5M R 95.0 0.1 0:00.18 qnn_llama_runne+ m12873 root 20 0 10G 104M 5.0M R 61.0 0.4 0:01.13 qnn_llama_runne+ 12873 root 20 0 12G 1.0G 897M S 29.0 4.3 0:01.74 qnn_llama_runne+ 12873 root 20 0 12G 1.0G 897M S 29.0 4.3 0:02.03 qnn_llama_runne+ m12873 root 20 0 12G 1.0G 897M R 29.0 4.3 0:02.32 qnn_llama_runne+ 12873 root 20 0 12G 1.0G 897M S 26.0 4.3 0:02.61 qnn_llama_runne+ m12873 root 20 0 12G 1.0G 897M R 30.0 4.3 0:02.87 qnn_llama_runne+ 12873 root 20 0 12G 1.0G 897M S 29.0 4.3 0:03.17 qnn_llama_runne+ 12873 root 20 0 12G 1.0G 897M S 29.0 4.3 0:03.46 qnn_llama_runne+

Qwen3-1.7B:

quan and convert setting: num_sharding = 2 # quant config # ptq = QuantDtype.use_16a4w_block ptq = QuantDtype.use_16a8w group_size = None masked_softmax = True seq_mse_candidates = 0 r1 = False r2 = False r3 = False

run on the device 8295:--seq_len 1024 --kv_updater ShiftPointer

2042 root 20 0 15G 2.3G 2.2G S 14.2 9.8 0:07.83 qnn_llama_runne+ Tasks: 486 total, 2 running, 484 sleeping, 0 stopped, 0 zombie 2042 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:07.87 qnn_llama_runne+ 2042 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:08.32 qnn_llama_runne+ 2042 root 20 0 15G 2.3G 2.2G S 15.3 9.8 0:08.77 qnn_llama_runne+ m 2042 root 20 0 15G 2.3G 2.2G R 14.3 9.8 0:09.23 qnn_llama_runne+ 2042 root 20 0 15G 2.3G 2.2G S 15.3 9.8 0:09.66 qnn_llama_runne+ 2042 root 20 0 15G 2.3G 2.2G S 14.6 9.8 0:10.12 qnn_llama_runne+ 2042 root 20 0 15G 2.3G 2.2G S 16.0 9.8 0:10.56 qnn_llama_runne+ 2042 root 20 0 15G 2.3G 2.2G S 18.6 9.8 0:11.04 qnn_llama_runne+ m 4787 root 20 0 13G 868M 807M R 37.0 3.5 0:01.63 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:02.74 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:03.19 qnn_llama_runne+ m 4787 root 20 0 15G 2.3G 2.2G R 15.6 9.8 0:03.64 qnn_llama_runne+ m 4787 root 20 0 15G 2.3G 2.2G R 15.6 9.8 0:04.11 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 13.6 9.8 0:04.58 qnn_llama_runne+ m 4787 root 20 0 15G 2.3G 2.2G R 15.3 9.8 0:04.99 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:05.45 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:05.90 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.3 9.8 0:06.35 qnn_llama_runne+ m 4787 root 20 0 15G 2.3G 2.2G R 15.3 9.8 0:06.81 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.0 9.8 0:07.27 qnn_llama_runne+ 4787 root 20 0 15G 2.3G 2.2G S 15.6 9.8 0:07.72 qnn_llama_runne+ m 4787 root 20 0 15G 2.3G 2.2G R 14.6 9.8 0:08.19 qnn_llama_runne+

The runner with Qwen3-0.6b needs higher CPU usage than that with Qwen3-1.7b, Is it caused by SeqMSE or others?do you have any suggestions or insights that could help me?

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin

lansexinhu avatar Nov 27 '25 02:11 lansexinhu

For Qwen3-1.7B, what quant config do you use? If you refer to https://github.com/pytorch/executorch/issues/15410, it seems like you're quantizing 16a8w for the 0.6B?

For the 1.7B, it's not super clear to me from the log

cccclai avatar Dec 01 '25 05:12 cccclai

For Qwen3-1.7B, what quant config do you use? If you refer to #15410, it seems like you're quantizing 16a8w for the 0.6B?

For the 1.7B, it's not super clear to me from the log

For the 1.7B, the setting as: `

num_sharding = 2
ptq = QuantDtype.use_16a8w
group_size = None
masked_softmax = True
seq_mse_candidates = 0
r1 = False
r2 = False
r3 = False
custom_annotation = (
    annotate_kv_8bit,
    annotate_output_16a8w,
)

`

lansexinhu avatar Dec 01 '25 06:12 lansexinhu

Are you using the same config for both 0.6B and 1.7B?

cccclai avatar Dec 01 '25 18:12 cccclai

Are you using the same config for both 0.6B and 1.7B?

Yes.

lansexinhu avatar Dec 02 '25 01:12 lansexinhu

@shewu-quic @haowhsu-quic @winskuo-quic @DannyYuyang-quic thoughts on this?

cccclai avatar Dec 02 '25 05:12 cccclai

Hi @lansexinhu, Could you share both output results of Qwen0.6B and 1.7B when you observe higher memory usage for 0.6B compared to 1.7B? Thanks

winskuo-quic avatar Dec 02 '25 09:12 winskuo-quic

Hi @lansexinhu, Could you share both output results of Qwen0.6B and 1.7B when you observe higher memory usage for 0.6B compared to 1.7B? Thanks

Qwen3-0.6B

log: ` ./qnn_llama_runner --decoder_model_version qwen3 --tokenizer_path ../qwen3_0-6b-16a8w/tokenizer.json --model_path ../qwen3_0-6b-16a8w/hybrid_llama_qnn.pte --seq_len 1024 --kv_updater ShiftPointer --prompt "write a paper about the Spring in Chinese." updater ShiftPointer --prompt "write a paper about the Spring in Chinese." < I tokenizers:regex.cpp:27] Registering override fallback regex I 00:00:00.000938 executorch:runner.cpp:148] creating module: model_path=../qwen3_0-6b-16a8w/hybrid_llama_qnn.pte I 00:00:00.000968 executorch:runner.cpp:149] creating runner: tokenizer_path=../qwen3_0-6b-16a8w/tokenizer.json I 00:00:00.000970 executorch:runner.cpp:150] eval mode=1 I 00:00:00.000972 executorch:runner.cpp:151] kv updater=ShiftPointer I tokenizers:hf_tokenizer.cpp:142] Setting up normalizer... I tokenizers:normalizer.cpp:89] Using NFC normalizer. Please notice that our implementation may not handle all edge cases. I tokenizers:hf_tokenizer.cpp:146] Normalizer set up I tokenizers:hf_tokenizer.cpp:160] Setting up pretokenizer... WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1764288931.805600 29466 re2.cc:237] Error parsing '((?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]|\s[\r\n]+|\s...': invalid perl operator: (?! I tokenizers:re2_regex.cpp:27] Re2 failed to compile regex: ((?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]|\s[\r\n]+|\s+(?!\S)|\s+), error: invalid perl operator: (?! This may be ok if a fallback regex is used. I tokenizers:regex_lookahead.cpp:27] Creating PCRE2 regex I tokenizers:hf_tokenizer.cpp:164] Pretokenizer set up I tokenizers:hf_tokenizer.cpp:180] Loading BPE merges... I tokenizers:hf_tokenizer.cpp:218] Loaded 151387 BPE merge rules I tokenizers:hf_tokenizer.cpp:230] Built merge ranks map with 151387 entries I 00:00:01.312004 executorch:llm_runner_helper.cpp:54] Loaded json tokenizer I tokenizers:hf_tokenizer.cpp:393] normalized input: '' -> '' [INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol [INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 1 [INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2 [WARNING] [Qnn ExecuTorch]: Qnn API version 2.30.0 is used. The version is tested against 2.24.0. [INFO] [Qnn ExecuTorch]: Caching: Caching is in RESTORE MODE. [INFO] [Qnn ExecuTorch]: QnnContextCustomProtocol expected magic number: 0x5678abcd but get: 0x2000000 [INFO] [Qnn ExecuTorch]: Running level=1 optimization. [INFO] [Qnn ExecuTorch]: Running level=1 optimization. [INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol [INFO] [Qnn ExecuTorch]: Use cached delegate handle for current method: kv_forward I 00:00:02.075084 executorch:runner.cpp:228] Reading metadata from model I 00:00:02.075129 executorch:runner.cpp:344] creating io_memory I tokenizers:hf_tokenizer.cpp:393] normalized input: '' -> '' I tokenizers:hf_tokenizer.cpp:393] normalized input: 'user write a paper about the Spring in Chinese.' -> 'user write a paper about the Spring in Chinese.' I tokenizers:hf_tokenizer.cpp:393] normalized input: ' ' -> ' ' I tokenizers:hf_tokenizer.cpp:393] normalized input: 'assistant' -> 'assistant' I 00:00:02.106415 executorch:prompt_processor.cpp:265] Prompt Processor: total 17 prompt tokens (AR-128 * 1 iters) I 00:00:02.177207 executorch:runner.cpp:455] RSS after prompt prefill: 1062.347656 MiB (0 if unsupported)

I 00:00:20.162676 executorch:token_generator.cpp:322] Reached to the end of generation I 00:00:20.162686 executorch:runner.cpp:465] RSS after finishing text generation: 1062.488281 MiB (0 if unsupported) PyTorchObserver {"prompt_tokens":17,"generated_tokens":552,"model_load_start_ms":1764288931194,"model_load_end_ms":1764288933298,"inference_start_ms":1764288933298,"inference_end_ms":1764288951356,"prompt_eval_end_ms":1764288933370,"first_token_ms":1764288933370,"aggregate_sampling_time_ms":200,"SCALING_FACTOR_UNITS_PER_SECOND":1000} I 00:00:20.162711 executorch:stats.h:143] Prompt Tokens: 17 Generated Tokens: 552 I 00:00:20.162713 executorch:stats.h:149] Model Load Time: 2.104000 (seconds) I 00:00:20.162716 executorch:stats.h:159] Total inference time: 18.058000 (seconds) Rate: 30.568169 (tokens/second) I 00:00:20.162719 executorch:stats.h:167] Prompt evaluation: 0.072000 (seconds) Rate: 236.111111 (tokens/second) I 00:00:20.162723 executorch:stats.h:178] Generated 552 tokens: 17.986000 (seconds) Rate: 30.690537 (tokens/second) I 00:00:20.162726 executorch:stats.h:186] Time to first generated token: 0.072000 (seconds) I 00:00:20.162728 executorch:stats.h:193] Sampling time over 569 tokens: 0.200000 (seconds) [INFO] [Qnn ExecuTorch]: Destroy Qnn backend parameters [INFO] [Qnn ExecuTorch]: Destroy Qnn context [INFO] [Qnn ExecuTorch]: Destroy Qnn device [INFO] [Qnn ExecuTorch]: Destroy Qnn backend `

outputs: ` <|im_start|>user write a paper about the Spring in Chinese.<|im_end|> <|im_start|>assistant Okay, the user wants a paper about the Spring in Chinese. Let me start by understanding the request. They might be looking for a descriptive article that captures the essence of Spring in China. First, I need to consider the key elements of Spring in Chinese culture. That includes the traditional festivals, nature changes, and the cultural significance.

I should mention the Spring Festival, which is a major holiday. Also, the arrival of spring, the blooming of flowers, and the changing of the seasons. Maybe include some traditional activities people do during this time. I need to make sure the language is appropriate for a paper, so it should be formal but still accessible.

Wait, the user might not be a native Chinese speaker, so I should avoid any cultural references that might be confusing. Also, since it's a paper, it should be structured with sections. Maybe start with an introduction, then the main points, and a conclusion. I should check if there are any specific aspects they want highlighted, but since the query is general, I'll keep it broad.

I should also think about the tone. It should be informative and engaging. Maybe include some examples of activities or symbols associated with Spring. Also, ensure that the language is correct and flows well. Let me structure this now.

春之华章:中国春季的诗意与文化

春,是大自然与人类情感交织的季节。在农历的正月,中国各地迎来一场盛大的“春节”——春分节。这一节日不仅是农耕活动的高潮,更承载着人们对自然与生命的敬畏与感恩。

春之伊始,万物复苏,花开花落,山川焕新。人们踏着湿润的泥土,感受春日的温暖;漫步于郊野,聆听鸟鸣与溪流的和谐之声。春日的色彩斑斓,如一幅幅生动的画卷,令人心旷神怡。

在中国传统文化中,春不仅是农耕的象征,更是精神与生活的象征。人们通过祭祖、踏青、赏花等活动,寄托对自然的敬畏与对生活的热爱。春日的来临,也象征着新生与希望,提醒人们珍惜当下,迎接未来的美好时光。

春,不仅是一个季节的名称,更是一种文化精神的体现。它跨越地域与时间,成为中华文明中一段永恒的诗意篇章。

结语
春之华章,不仅描绘了自然的变迁,也映照出人类对生活的热爱与思考。在春的怀抱中,我们得以重新审视与感悟生命的意义。


(全文可根据需要调整内容的详略程度与风格)<|im_end|>

`

Qwen3-1.7B

log: ` ./qnn_llama_runner --decoder_model_version qwen3 --tokenizer_path ../qwen3_1-7b-16a8w/tokenizer.json --model_path ../qwen3_1-7b-16a8w/hybrid_llama_qnn.pte --seq_len 1024 --kv_updater ShiftPointer --prompt "write a paper about the Spring in Chinese." updater ShiftPointer --prompt "write a paper about the Spring in Chinese." < I tokenizers:regex.cpp:27] Registering override fallback regex I 00:00:00.000460 executorch:runner.cpp:148] creating module: model_path=../qwen3_1-7b-16a8w/hybrid_llama_qnn.pte I 00:00:00.000474 executorch:runner.cpp:149] creating runner: tokenizer_path=../qwen3_1-7b-16a8w/tokenizer.json I 00:00:00.000476 executorch:runner.cpp:150] eval mode=1 I 00:00:00.000477 executorch:runner.cpp:151] kv updater=ShiftPointer I tokenizers:hf_tokenizer.cpp:142] Setting up normalizer... I tokenizers:normalizer.cpp:89] Using NFC normalizer. Please notice that our implementation may not handle all edge cases. I tokenizers:hf_tokenizer.cpp:146] Normalizer set up I tokenizers:hf_tokenizer.cpp:160] Setting up pretokenizer... WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1764289867.344778 7432 re2.cc:237] Error parsing '((?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]|\s[\r\n]+|\s...': invalid perl operator: (?! I tokenizers:re2_regex.cpp:27] Re2 failed to compile regex: ((?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]|\s[\r\n]+|\s+(?!\S)|\s+), error: invalid perl operator: (?! This may be ok if a fallback regex is used. I tokenizers:regex_lookahead.cpp:27] Creating PCRE2 regex I tokenizers:hf_tokenizer.cpp:164] Pretokenizer set up I tokenizers:hf_tokenizer.cpp:180] Loading BPE merges... I tokenizers:hf_tokenizer.cpp:218] Loaded 151387 BPE merge rules I tokenizers:hf_tokenizer.cpp:230] Built merge ranks map with 151387 entries I 00:00:01.284953 executorch:llm_runner_helper.cpp:54] Loaded json tokenizer I tokenizers:hf_tokenizer.cpp:393] normalized input: '' -> '' [INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol [INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 1 [INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2 [WARNING] [Qnn ExecuTorch]: Qnn API version 2.30.0 is used. The version is tested against 2.24.0. [INFO] [Qnn ExecuTorch]: Caching: Caching is in RESTORE MODE. [INFO] [Qnn ExecuTorch]: QnnContextCustomProtocol expected magic number: 0x5678abcd but get: 0x2000000 [INFO] [Qnn ExecuTorch]: Running level=1 optimization. [INFO] [Qnn ExecuTorch]: Running level=1 optimization. [INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol [INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 1 [INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2 [WARNING] [Qnn ExecuTorch]: Qnn API version 2.30.0 is used. The version is tested against 2.24.0. [INFO] [Qnn ExecuTorch]: Caching: Caching is in RESTORE MODE. [INFO] [Qnn ExecuTorch]: QnnContextCustomProtocol expected magic number: 0x5678abcd but get: 0x2000000 [INFO] [Qnn ExecuTorch]: Running level=1 optimization. [INFO] [Qnn ExecuTorch]: Running level=1 optimization. [INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol [INFO] [Qnn ExecuTorch]: Use cached delegate handle for current method: kv_forward [INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol [INFO] [Qnn ExecuTorch]: Use cached delegate handle for current method: kv_forward I 00:00:02.914594 executorch:runner.cpp:228] Reading metadata from model I 00:00:02.914657 executorch:runner.cpp:344] creating io_memory I tokenizers:hf_tokenizer.cpp:393] normalized input: '' -> '' I tokenizers:hf_tokenizer.cpp:393] normalized input: 'user write a paper about the Spring in Chinese.' -> 'user write a paper about the Spring in Chinese.' I tokenizers:hf_tokenizer.cpp:393] normalized input: ' ' -> ' ' I tokenizers:hf_tokenizer.cpp:393] normalized input: 'assistant' -> 'assistant' I 00:00:02.946058 executorch:prompt_processor.cpp:265] Prompt Processor: total 17 prompt tokens (AR-128 * 1 iters) I 00:00:03.070019 executorch:runner.cpp:455] RSS after prompt prefill: 2438.921875 MiB (0 if unsupported)

I 00:01:02.713472 executorch:token_generator.cpp:333] Warning: Generation stopped at seq_len limit (1024) without reaching EOS token. Response may be incomplete. I 00:01:02.713480 executorch:token_generator.cpp:339] - seq_len (1024) already equals compiled max_seq_len (1024). Consider recompiling with larger --max_seq_len. I 00:01:02.713485 executorch:runner.cpp:465] RSS after finishing text generation: 2438.921875 MiB (0 if unsupported) PyTorchObserver {"prompt_tokens":17,"generated_tokens":1006,"model_load_start_ms":1764289866761,"model_load_end_ms":1764289869704,"inference_start_ms":1764289869704,"inference_end_ms":1764289928462,"prompt_eval_end_ms":1764289869831,"first_token_ms":1764289869831,"aggregate_sampling_time_ms":386,"SCALING_FACTOR_UNITS_PER_SECOND":1000} I 00:01:02.713514 executorch:stats.h:143] Prompt Tokens: 17 Generated Tokens: 1006 I 00:01:02.713546 executorch:stats.h:149] Model Load Time: 2.943000 (seconds) I 00:01:02.713550 executorch:stats.h:159] Total inference time: 58.758000 (seconds) Rate: 17.121073 (tokens/second) I 00:01:02.713564 executorch:stats.h:167] Prompt evaluation: 0.127000 (seconds) Rate: 133.858268 (tokens/second) I 00:01:02.713568 executorch:stats.h:178] Generated 1006 tokens: 58.631000 (seconds) Rate: 17.158159 (tokens/second) I 00:01:02.713572 executorch:stats.h:186] Time to first generated token: 0.127000 (seconds) I 00:01:02.713574 executorch:stats.h:193] Sampling time over 1023 tokens: 0.386000 (seconds) [INFO] [Qnn ExecuTorch]: Destroy Qnn backend parameters [INFO] [Qnn ExecuTorch]: Destroy Qnn context [INFO] [Qnn ExecuTorch]: Destroy Qnn device [INFO] [Qnn ExecuTorch]: Destroy Qnn backend [INFO] [Qnn ExecuTorch]: Destroy Qnn backend parameters [INFO] [Qnn ExecuTorch]: Destroy Qnn context [INFO] [Qnn ExecuTorch]: Destroy Qnn device [INFO] [Qnn ExecuTorch]: Destroy Qnn backend `

outputs: ` <|im_start|>user write a paper about the Spring in Chinese.<|im_end|> <|im_start|>assistant Okay, the user wants me to write a paper about the Spring in Chinese. Let me start by understanding what they need. They might be a student or someone interested in Chinese culture. The topic is "Spring," which is a significant season in Chinese tradition.

First, I should define what Spring is in Chinese culture. It's not just the season but also the festival, like the Spring Festival. I need to cover the traditional aspects, such as the Spring Festival, the customs, and the symbolism of Spring. Also, the natural elements like the blooming of flowers and the changing of seasons.

I should mention the historical significance. For example, the Spring Festival has been celebrated for thousands of years, with its origins in ancient times. The use of paper and firecrackers during the festival is important. Also, the concept of "Spring Festival" and its connection to the Lunar New Year.

Then, the natural aspects. The blooming of flowers, the return of migratory birds, and the changing of the seasons. These elements are central to the Spring festival. Also, the traditional activities like making dumplings, eating tangyuan, and the symbolism of the red envelope.

I need to structure the paper. Maybe start with an introduction about Spring in Chinese culture, then sections on the Spring Festival, the natural elements, the symbolism, and the modern significance. Also, include some historical references, like the Spring Festival's origins in ancient times, and how it's celebrated today.

Wait, the user might want a more detailed analysis. Maybe include some quotes or references to traditional texts. For example, the "Book of Documents" or other classical texts that mention Spring. Also, the role of Spring in Chinese philosophy, like the concept of "Wu Xing" (the Five Elements) and how Spring is associated with growth and renewal.

I should also mention the Spring Festival's connection to the Lunar New Year, the role of the Lunar calendar, and how the Spring Festival is a time for family reunions and renewal of relationships.

In the conclusion, summarize the importance of Spring in Chinese culture and its lasting impact on modern life.

I need to make sure the language is appropriate for a paper, using formal academic tone but still accessible. Check for any cultural nuances that might be important to highlight. Also, ensure that the paper flows logically from introduction to sections and conclusion.

Wait, the user might not be familiar with all the details, so I should explain terms like "tangyuan" and "red envelope" in the context of the Spring Festival. Also, mention the role of the Spring Festival in Chinese society, its role in connecting people, and the spiritual aspects.

I should also consider the structure: title, introduction, sections on the Spring Festival, natural elements, symbolism, historical context, modern significance, and conclusion. Each section should have subpoints.

Make sure to include both traditional and modern aspects. For example, how the Spring Festival is celebrated today with technology, but still retains its traditional elements.

Check for any possible errors in the information. For example, the Spring Festival is the Lunar New Year, and the Spring Festival is the most important festival. Also, the Spring Festival is celebrated in February or March, depending on the lunar calendar.

I think that's a solid outline. Now, time to put it all together into a coherent paper.

标题:春之韵:中国传统文化中的季节象征与精神内涵

摘要
春,作为中国传统文化中的重要季节,不仅象征着自然界的复苏与生命的萌发,更承载着深厚的文化内涵与精神价值。本文从春的自然意象、节日习俗、哲学象征及现代意义四个方面,探讨春在中国文化中的独特地位,揭示其作为“文化基因”的深远影响。


一、春的自然意象:生命轮回与自然律动

春在中国传统文化中是自然界的“复苏之季”,其象征意义贯穿于农耕、节庆与哲学思想。

  1. 自然界的生机勃发
    春日万物复苏,草木萌芽,候鸟归巢,天地间充满生机。古人以“春生”“夏长”“秋收”“冬藏”四时循环为宇宙规律,认为春之到来标志着生命与自然的重生。
  2. 五行哲学中的春意
    中国传统文化中的“五行”理论(木、火、土、金、水)中,春属“木”,象征生长与创造力。春日的“生”与“长”体现了自然界的动态平衡,亦暗合道家“天人合一”的思想。

二、春的节日习俗:文化传承与家庭纽带

春的节日习俗是中国文化的重要组成部分,其中最具代表性的当属春节(农历正月初一)。

  1. 春节:春的象征与精神寄托 `

lansexinhu avatar Dec 03 '25 07:12 lansexinhu

Hi @lansexinhu, Could you share both output results of Qwen0.6B and 1.7B when you observe higher memory usage for 0.6B compared to 1.7B? Thanks

0.6B with higher cpu and lower memory usage compared to 1.7B.

The problem remains even when the runner is bound to the same CPU(0) via taskset.

lansexinhu avatar Dec 03 '25 07:12 lansexinhu

Hi @lansexinhu, The higher CPU usage might be caused by qwen0.6B having higher token rate, meaning that it will have more frequent rpc call per second. In this case, the CPU usage will be higher than qwen1.7B, which has a lower token rate and less frequent rpc call per second.

winskuo-quic avatar Dec 03 '25 09:12 winskuo-quic

Higher token rate means that it will have frequent kv cache update as well.

shewu-quic avatar Dec 03 '25 10:12 shewu-quic

Okay, thanks for your detailed explanation! It’s very clear now that the higher CPU usage of Qwen-0.6B is primarily due to its higher token generation rate, which means more frequent KV cache updates and RPC calls per second. Much appreciated!

lansexinhu avatar Dec 03 '25 10:12 lansexinhu

Okay, thanks for your detailed explanation! It’s very clear now that the higher CPU usage of Qwen-0.6B is primarily due to its higher token generation rate, which means more frequent KV cache updates and RPC calls per second. Much appreciated!

In addition, it will have more frequent token sampling(logits_to_token) as well.

lansexinhu avatar Dec 04 '25 02:12 lansexinhu