Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnory/bf7d94069223902c252d03799d11f85f to your computer and use it in GitHub Desktop.
Save jnory/bf7d94069223902c252d03799d11f85f to your computer and use it in GitHub Desktop.
無料版colabのGPUなしランタイムでrinna modelを動かす
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnory
Copy link
Author

jnory commented Jul 4, 2023

https://huggingface.co/rinna/japanese-gpt-neox-3.6b-instruction-ppo を動かすためのツールとして https://github.com/togethercomputer/redpajama.cpp があります。
transformersの形式からggmlの形式に変換するスクリプトが付属していますが、これはモデルを一度メモリにロードする際メモリ使用量が多く、無料版のColabではメモリオーバーしてしまいます。
それの対策として、メモリ使用量を抑えながらモデルを読み込むように修正パッチを当てました。
結果として、GPUなしの無料版Colabでrinnaモデルをggmlに変換できました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment