Practical toolkit for LLM studies
To install LLM Toolset, ensure you have Python 3.9 or higher installed, then run the following command:
pip install llm-studypip install -e .(Optional) Install transformers from source:
pushd transformers
git fetch --tags && git checkout v4.47.1
popdLLM Toolset depends on the following libraries:
- transformers (version >= 4.47.1)
kv_calc.py provides basic key-value calculation functionalities.
from llm_toolset.kv_calc import calculate_key_value
result = calculate_key_value(data)or use in shell
$ python -m llm_study.kv_calc -h