ちょっと試したけどこんな感じでできた
ChunkllamaのGitHubからchunkllama_attn_replace.pyを持ってきてtext-generation-webuiのmodulesフォルダに入れる
同じmodulesフォルダの中にあるmodels.py開いて
上のimport文に
from .chunkllama_attn_replace import replace_with_chunkmistral
を追加
同じmodels.pyの133行目にhuggingface_loaderがあるからこの中のどこか(一番最初とか)に
replace_with_chunkmistral(pretraining_length=4096)
を追加
text-generation-webuiからTransformers形式でモデル読み込み(GGUFとかは無理)