未分类
1.2k 词
选择Qwen3-0.6B的原因:占用显存小,个人的电脑是NVIDIA GeForce RTX 3050 (4GB 显存),运行无压力 导入模型 导入模型 这一步骤包括导入tokenizer和model,分别记录模型使用的token和存储模型参数 打印模型 这里可以看到Qwen3-0.6B的模型架构,由28个DecoderBlock组成,Embedding和lm_head是权重共享的,通过计算不难发现参数量大约为5.96亿,确实是个0.6B的模型。图中q_norm和k_norm是128维度,由此可以看出Qwen3的Attention的Query有16个Head,两个Head共用一个Key,典型的GQA。 观察tokenizer decode可以同时处理单个数字和数字列表 打印所有的token 解码所有的token,发现有一些emoji和中英文之外的语言,还有一些奇奇怪怪的符号。怪不得输出这么丰富,连这么小的模型都有这么大且丰富的词表 打印出长度前k长的token 最长的token竟然有114个字节,还是很有意思的 这么长的序列,竟然只用两个token就能表示,推理的压力...
205 词
Here's something encrypted, password is required to continue reading.
131 词
Level 1 Header Some content here. Level 2 Header More content. Level 3 Header Deep content. Another Level 1 Another Level 2 End of content.
661 词
Here's something encrypted, password is required to continue reading.