ModuleLLMにTinySwallowを入れてみる -1-

記事にしている人がいるので、様子はわかるのだけど、なんか、入れてみた結果があんまりないのが気になる。モデルのオリコウさとか、アホさがよくわからない。

TinySwallow-1.5B を M5stack LLM Module に組み込んでみた #M5StackLLM
https://qiita.com/inachi/items/0253ef8b3834a2ac73bd

 なので入れてみる。追試するだけだけどw

 (しかし追試とはいっても一筋縄ではいかない...)

taoki/TinySwallow-1.5B-Instruct-w8a16 · Hugging Face
https://huggingface.co/taoki/TinySwallow-1.5B-Instruct-w8a16

 さて、このモデルは、TAID(Temporally Adaptive Interpolated Distillation)を使った知識蒸留を核に作られている。大きなモデル(Qwen2.5-32B-Instruct)を教師モデルとして、小型モデル(Qwen2.5-1.5B-Instruct)に段階的に知識を移す方式をとっているそうだ。

 さらに、事前学習+日本語データによる追加学習を経ていて、日本語性能を強化しているそうなので、日本語応答には期待したいところ。

 ライセンスはAPL2なので、利用には特許放棄をのぞいてとくに問題はなさそう。ただ、「本モデルは研究開発目的のみに提供されており、実験的なプロトタイプとしてご活用ください。商用利用やミッションクリティカルな環境への導入は想定されていません。」と書かれている。

 このドキュメント通りにインストールすると、一回こっきりになってしまうので、せっかくなのでdebパッケージ化しておきいたい。

 というわけで、AIに指示書を書かせる。

 ---

 TinySwallow-1.5BをModuleLLMで使用可能なdebパッケージにしたいです。

動作手順としては以下が参考になります。
https://qiita.com/inachi/items/0253ef8b3834a2ac73bd

 類似のパッケージ例としてqwen2.5-1.5bでは以下のようなファイル構成になっています。

root@m5stack-LLM:~# dpkg -L llm-model-qwen2.5-1.5b-ax630c

 /.

 /opt

 /opt/m5stack

 /opt/m5stack/data

 /opt/m5stack/data/models

 /opt/m5stack/data/models/mode_qwen2.5-1.5B-ax630c.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/hashes.txt

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/model.embed_tokens.weight.bfloat16.bin

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l0_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l10_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l11_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l12_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l13_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l14_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l15_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l16_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l17_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l18_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l19_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l1_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l20_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l21_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l22_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l23_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l24_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l25_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l26_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l27_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l2_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l3_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l4_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l5_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l6_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l7_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l8_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_p128_l9_together.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/qwen2_post.axmodel

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer/config.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer/configuration.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer/generation_config.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer/tokenizer.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer/tokenizer_config.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/tokenizer/vocab.json

 /opt/m5stack/data/qwen2.5-1.5B-ax630c/version

 /opt/m5stack/scripts

 /opt/m5stack/scripts/tokenizer_qwen2.5-1.5B-ax630c.py

root@m5stack-LLM:~# cat /var/lib/dpkg/info/llm-model-qwen2.5-1.5b-ax630c.postinst
#!/bin/sh

 exit 0

root@m5stack-LLM:~# cat /var/lib/dpkg/info/llm-model-qwen2.5-1.5b-ax630c.prerm
#!/bin/sh

 exit 0

 不足している情報はありますか?

 ---

 うーん、なんか要領をえない回答しか返ってこないな... 自分でやるか...

 作業用のベースディレクトリを作成。

root@m5stack-LLM:~# mkdir -p /root/tinyswallow-deb/work

 DEBIAN制御ファイル用ディレクトリを作成。

root@m5stack-LLM:~# mkdir -p /root/tinyswallow-deb/work/DEBIAN

 モデルとトークナイザーを配置するディレクトリを作成。モデルのパッケージ名は、「llm-model-tinyswallow-1.5b-ax630c」にしておく。

root@m5stack-LLM:~# mkdir -p /root/tinyswallow-deb/work/opt/m5stack/data/models
root@m5stack-LLM:~# mkdir -p /root/tinyswallow-deb/work/opt/m5stack/data/tinyswallow-1.5b-ax630c/tokenizer

 モデルファイルの配置。

 まず、huggingfaceからモデルをダウンロードしておく。

root@m5stack-LLM:~# pip install -U huggingface_hub
Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.26.3)

 Collecting huggingface_hub

 Downloading huggingface_hub-0.35.1-py3-none-any.whl (563 kB)

 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 563.3/563.3 KB 2.0 MB/s eta 0:00:00

Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0.2)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.12.2)
Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.67.1)
Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2024.10.0)
Collecting hf-xet<2.0.0,>=1.1.3

 Downloading hf_xet-1.1.10-cp37-abi3-manylinux_2_28_aarch64.whl (3.1 MB)

 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 5.7 MB/s eta 0:00:00

Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.16.1)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.32.3)
Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (24.2)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2024.8.30)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.10)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.4.0)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.2.3)

 Installing collected packages: hf-xet, huggingface_hub

 Attempting uninstall: huggingface_hub

 Found existing installation: huggingface-hub 0.26.3

Uninstalling huggingface-hub-0.26.3:

 Successfully uninstalled huggingface-hub-0.26.3

 Successfully installed hf-xet-1.1.10 huggingface_hub-0.35.1

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

root@m5stack-LLM:~# huggingface-cli download --resume-download taoki/TinySwallow-1.5B-Instruct-w8a16 --local-dir TinySwallow-1.5B-Instruct-w8a16

 (snip)

 え? モデルどこ?

root@m5stack-LLM:~# ls -l TinySwallow-1.5B-Instruct-w8a16/

 total 8

-rw-r--r-- 1 root root 2929 Sep 29 12:56 README.md
drwxr-xr-x 2 root root 4096 Sep 29 12:56 TinySwallow-1.5B-Instruct-ax630c

root@m5stack-LLM:~# ls -l TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/

 total 8

-rw-r--r-- 1 root root 605 Sep 29 12:56 added_tokens.json
-rw-r--r-- 1 root root 242 Sep 29 12:56 generation_config.json

 あー、落ちてきてないでメモリ不足で終わっている。ダウンロードの並列度が高すぎてメモリ足りない感じ?

root@m5stack-LLM:~# ls -la TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/

 total 10008

-rw-r--r-- 1 root root 49685419 Sep 29 13:06 '-pDVTdBpJCJ2t3sr1u3RakXmv8k=.d95dabd8391d529cd7bf1f3c352d25846af7acbe5643dbd09c27d4b7e31c9ec5.incomplete'
drwxr-xr-x 2 root root     4096 Sep 29 12:56  .
drwxr-xr-x 3 root root     4096 Sep 29 12:56  ..
-rw-r--r-- 1 root root 49685267 Sep 29 13:06 '2xas91dU4nm5k_S6FwwMhrwnLB8=.b19a9eb01b0eecb8916cd6ba6b265531ce922d504d329c93ebb37ed9a36d13fa.incomplete'
-rw-r--r-- 1 root root        0 Sep 29 12:56 '5vTQO6e0JeFfncN6fV-Is6jIGiE=.47be7228eb1738b5051685c8ded39e45ca67d05bb5e857862715da278a9dad55.incomplete'
-rw-r--r-- 1 root root 49685515 Sep 29 13:06 'VPJKepKBPHmGcnkBgSJGvhDPtH0=.27a88a9a0489525fba109df6e35614378477aa0925aac140b320494cb1914d56.incomplete'
-rw-r--r-- 1 root root 49685523 Sep 29 13:06 'aQLtFqUiI1K10x098GrOO3RA9CI=.40f3d1d302e44e1a223f4aba7f9f657c952cfb539731596a6fdf72879ee0d099.incomplete'
-rw-r--r-- 1 root root        0 Sep 29 13:06  added_tokens.json.lock
-rw-r--r-- 1 root root      101 Sep 29 12:56  added_tokens.json.metadata
-rw-r--r-- 1 root root        0 Sep 29 13:06  generation_config.json.lock
-rw-r--r-- 1 root root      100 Sep 29 12:56  generation_config.json.metadata
-rw-r--r-- 1 root root        0 Sep 29 13:06  model.embed_tokens.weight.bfloat16.bin.lock
-rw-r--r-- 1 root root        0 Sep 29 12:56 'oW47zBlSQBBLWI2-BL7jKKGjC2Q=.dbbafab16e20e9b5452aafa88522af079915707d76366c3023ae967c3bd40370.incomplete'
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l0_together.axmodel.lock
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l10_together.axmodel.lock
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l11_together.axmodel.lock
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l12_together.axmodel.lock
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l13_together.axmodel.lock
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l14_together.axmodel.lock
-rw-r--r-- 1 root root        0 Sep 29 13:06  qwen2_p128_l15_together.axmodel.lock
-rw-r--r-- 1 root root 49685627 Sep 29 13:06 'xBVCtehpvdqlPImmDPD5hg-Y5Pg=.4eb93f516dacd565759b8bdca746563d946aea5c816805729d3dd0b182ca7058.incomplete'
-rw-r--r-- 1 root root 49685563 Sep 29 13:06 'zkLy86RfUqN6N6-UTUL9wfyY-2s=.08b066a9197ca710f020ead56d4bc1b573e335d3e00c273ff3376839a34d0d97.incomplete'

 リトライは、--resume-downloadだとダメみたい。でも、外してもうまくいかない。

root@m5stack-LLM:~# huggingface-cli download taoki/TinySwallow-1.5B-Instruct-w8a16 --local-dir TinySwallow-1.5B-Instruct-w8a16

 並列ダウンロードもやめるか。個別ダウンロードで。

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16   TinySwallow-1.5B-Instruct-ax630c/tokenizer.json --local-dir "TinySwallow-1.5B-Instruct-w8a16"
Downloading 'TinySwallow-1.5B-Instruct-ax630c/tokenizer.json' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/HgM_lKo9sdSCfRtVg7MMFS7EKqo=.d24314ef7f0afd1b678c2e24c767e19f24f86b0e.incomplete'
tokenizer.json: 7.03MB [00:00, 21.4MB/s]

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/tokenizer.json

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/tokenizer.json

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16 TinySwallow-1.5B-Instruct-ax630c/tokenizer_config.json --local-dir "TinySwallow-1.5B-Instruct-w8a16"
Downloading 'TinySwallow-1.5B-Instruct-ax630c/tokenizer_config.json' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/vzaExXFZNBay89bvlQv-ZcI6BTg=.2a95d8fb3f39f3e602dce79cd501ee2697229eee.incomplete'
tokenizer_config.json: 7.44kB [00:00, 3.79MB/s]

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/tokenizer_config.json

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/tokenizer_config.json

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16 TinySwallow-1.5B-Instruct-ax630c/special_tokens_map.json --local-dir "TinySwallow-1.5B-Instruct-w8a16"
Downloading 'TinySwallow-1.5B-Instruct-ax630c/special_tokens_map.json' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/ahkChHUJFxEmOdq5GDFEmerRzCY=.ac23c0aaa2434523c494330aeb79c58395378103.incomplete'
special_tokens_map.json: 100%|██████████████████| 613/613 [00:00<00:00, 525kB/s]

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/special_tokens_map.json

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/special_tokens_map.json

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16 TinySwallow-1.5B-Instruct-ax630c/vocab.json --local-dir "TinySwallow-1.5B-Instruct-w8a16"
Downloading 'TinySwallow-1.5B-Instruct-ax630c/vocab.json' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/j3m-Hy6QvBddw8RXA1uSWl1AJ0c=.4783fe10ac3adce15ac8f358ef5462739852c569.incomplete'
vocab.json: 2.78MB [00:00, 14.7MB/s]

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/vocab.json

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/vocab.json

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16 TinySwallow-1.5B-Instruct-ax630c/generation_config.json --local-dir "TinySwallow-1.5B-Instruct-w8a16"

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/generation_config.json

 とりあえずモデル以外のファイルは来た。

root@m5stack-LLM:~# ls TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/

 added_tokens.json special_tokens_map.json tokenizer_config.json

 generation_config.json tokenizer.json vocab.json

 モデルを落とす。

root@m5stack-LLM:~# for i in $(seq 0 27); do

 hf download taoki/TinySwallow-1.5B-Instruct-w8a16 \

TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l${i}_together.axmodel \

 --local-dir "TinySwallow-1.5B-Instruct-w8a16"

 done

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l0_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/-pDVTdBpJCJ2t3sr1u3RakXmv8k=.d95dabd8391d529cd7bf1f3c352d25846af7acbe5643dbd09c27d4b7e31c9ec5.incomplete' (resume from 49685419/49919320)
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l0_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l0_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l1_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/vM8BbmCGmtG5TAz6_CHs3rE31xQ=.4c3a930dd1ad67d0a8fb5ff27e5f1f7e099d60caa99bfcc8a4a5896356dac1d1.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l1_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l1_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l2_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/VLNjN5V_Yx6YnFwVG8hAlqGRzc8=.52911398c6ce896c71e0dcd51f77976f2d9f7733aaddff7f2ae9c82476b1aef0.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l2_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l2_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l3_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/HgDI3LvaSMIyyp-NQgD-rlQUCGU=.d78128086596a7f701ba02cb643ceae7367ee5186bfae4e36ad5e690ce95e0a3.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l3_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l3_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l4_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/8by29Z-3UWakXd_z7fOXcvQBIYg=.28d5e139444b7d0e2cf982a20c8180f0d5893c2b59a9b5117a07ac504def956f.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l4_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l4_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l5_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/olzbqf-5LYfcFW_YgHGkSBMV1xw=.79fd918c39cacce0a6c7dd3ad95bac154d315606c27c05d59c2efebfdc6c6965.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l5_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l5_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l6_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/fdtKGzrNVcM53Q7bT9GIkIbuuoQ=.a71e3e8eb37a83e383765cda0f8dd697ed7b01084d4a54ed7d181e52040e00f9.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l6_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l6_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l7_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/uN_57coPzaOTIXOZg3xQFuHrHI8=.0912faada8ff476a5fe3d9245db7b74d4bbf97614715a3e364cd0d920fd3f625.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l7_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l7_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l8_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/MRACE-zxq8Kte--IGyO1RyNFOhw=.c1c622748d1adbff170767a86d117b6ae2f50b9de9eb84ed533d3e6caf5567e2.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l8_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l8_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l9_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/COdyd1uJhkG3O54nJJvnOp_-6O8=.2273a2d59a5d695caf171657f154e8da4efccb68426d9bb2c68f990b1bc3a2c9.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l9_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l9_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l10_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/xBVCtehpvdqlPImmDPD5hg-Y5Pg=.4eb93f516dacd565759b8bdca746563d946aea5c816805729d3dd0b182ca7058.incomplete' (resume from 49685627/49919512)
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l10_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l10_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l11_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/2xas91dU4nm5k_S6FwwMhrwnLB8=.b19a9eb01b0eecb8916cd6ba6b265531ce922d504d329c93ebb37ed9a36d13fa.incomplete' (resume from 49685267/49919240)
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l11_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l11_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l12_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/zkLy86RfUqN6N6-UTUL9wfyY-2s=.08b066a9197ca710f020ead56d4bc1b573e335d3e00c273ff3376839a34d0d97.incomplete' (resume from 49685563/49919480)
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:10<00:00, 4

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l12_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l12_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l13_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/aQLtFqUiI1K10x098GrOO3RA9CI=.40f3d1d302e44e1a223f4aba7f9f657c952cfb539731596a6fdf72879ee0d099.incomplete' (resume from 49685523/49919416)
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l13_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l13_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l14_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/VPJKepKBPHmGcnkBgSJGvhDPtH0=.27a88a9a0489525fba109df6e35614378477aa0925aac140b320494cb1914d56.incomplete' (resume from 49685515/49919392)
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l14_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l14_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l15_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/oW47zBlSQBBLWI2-BL7jKKGjC2Q=.dbbafab16e20e9b5452aafa88522af079915707d76366c3023ae967c3bd40370.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l15_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l15_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l16_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/9eFvMWgvBrZuKnyMcjDI1fBvAS0=.e45bec764790d636b2631d5b31c6a5e28c57834a32d52bd8c048d02bb462dbee.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l16_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l16_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l17_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/otst-eV6hZdPAoJjpC4ZAqTZKD0=.0a79b21091a45d2fbe32e9bbb07138b0c637b950923c692d067f94a6953d98c2.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:10<00:00, 4

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l17_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l17_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l18_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/fXgB33CMb4uDUIkaRLoEDZDpxE4=.64b44f4f93b7cb6e449236e7c39695d0071721ae4fdaf0f80384af0f33b38e2b.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l18_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l18_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l19_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/xqUFwCnQecYxym82Wap1Se6HpJY=.ead3c4b30d4d8e718fc8fa8fbcdb8a8d24263b12585bfc9ceb9e027840ad000f.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l19_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l19_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l20_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/DDSy6OAhEuv0gwz7EqbcszWVNOk=.8a65f8db05117af695a7dafb91b433a0ffc870408738d0990710e311330a7ef3.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l20_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l20_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l21_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/ZBn4k0UYLlRGpIlQEH65yYdfsx0=.64ff558fac2efaa4b1643b0e745a28b24db3f7a24540da82a0c8847184cf810e.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l21_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l21_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l22_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/V2oqZ3NXTHN3Suvs47BEf5iF6QY=.aa279b5931436da9fae5fe7e9515dffd8ca28f8a7a9a22035b6b77acbab1c98d.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l22_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l22_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l23_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/TMdS1cGS6VQjel6EpCsTfAp-WDY=.e860c6201b693b38b37ab516ee9a82a4304d4118b1757317e4b89e24a9d2d12f.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:05<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l23_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l23_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l24_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/AP8diWJ0p94uWjAGp7_amrP4fXI=.ceb27bdbca0b2961f79a4dbbba229d6d766eb3b5f187b389c65dc32e3fbf209b.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l24_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l24_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l25_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/6TFazLAj2WaZBhG5TfBE0HhMHP8=.719726adeafb46dbac082e5886c3c12fa694eb12fac35dd90aa30f103ca5cf91.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l25_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l25_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l26_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/Owe8CnGL8zVNdAujz-7QMr6VpnU=.c3107e976552557b691b0bbec2d2c071aed93ba949ec45b144d32d768915de44.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l26_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l26_together.axmodel

Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l27_together.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/AyPoYQwYeXxnhxtL5GupOB3WlLo=.73460b8859cecd4140821098aa529e91fd53ba79d74d1eb35a39334941840e62.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 49.9M/49.9M [00:06<00:00, 7

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l27_together.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_p128_l27_together.axmodel

 post層もあるのね。237Mか。ちょっとデカい。

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16 TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel --local-dir "TinySwallow-1.5B-Instruct-w8a16"
Downloading 'TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/2bswNpjBFHGO1P8X_hchWQ3g_2o=.0c880e8c94c155d9e28a36a729af91cab9d0947ff63033a995889fa4f93cd4a4.incomplete'
TinySwallow-1.5B-Instruct-ax630c/qwen2_p(…): 100%|█| 237M/237M [00:24<00:00, 9.8

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/qwen2_post.axmodel

 埋め込み重み(token embedding weight)は別になっているタイプか。こっちも467Mと大きい。

root@m5stack-LLM:~# hf download taoki/TinySwallow-1.5B-Instruct-w8a16 TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin --local-dir "TinySwallow-1.5B-Instruct-w8a16"
Downloading 'TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin' to 'TinySwallow-1.5B-Instruct-w8a16/.cache/huggingface/download/TinySwallow-1.5B-Instruct-ax630c/5vTQO6e0JeFfncN6fV-Is6jIGiE=.47be7228eb1738b5051685c8ded39e45ca67d05bb5e857862715da278a9dad55.incomplete'
TinySwallow-1.5B-Instruct-ax630c/model.e(…): 100%|█| 467M/467M [00:40<00:00, 11.

 Download complete. Moving file to TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin

 TinySwallow-1.5B-Instruct-w8a16/TinySwallow-1.5B-Instruct-ax630c/model.embed_tokens.weight.bfloat16.bin

 長くなったので次へ。

 100円投げ銭  https://kinneko.booth.pm/items/1963720


オリジナル投稿:
ModuleLLMにTinySwallowを入れてみる -1-|kinneko|pixivFANBOX
https://kinneko.fanbox.cc/posts/10641152