lm-evaluation-harness
lm-evaluation-harness copied to clipboard
Add Gigachat model
Add a new model to the library using the API with chat templates. For authorization set environmental variables "GIGACHAT_CREDENTIALS" and "GIGACHAT_SCOPE" for your API auth_data and scope (GIGACHAT_API_CORP or GIGACHAT_API_PERS) respectively.
Here are some usage examples: Run gsm8k with logger:
lm_eval --model gigachat_llms \
--model_args model="GigaChat",profanity_check=False\
--tasks gsm8k \
--device cpu \
--write_out \
--log_samples \
--output_path './gsm8k.json'
Before using the chat template, set the description in the YAML config. For example, for gsm8k, use the following description: "You have a simple math problem in front of you. Solve it by writing down all the arguments and the answer: final digits after symbols ####." We recommend to use chat template with --system_instruction
in order to get better results.
Apply the chat template using the following command:
lm_eval --model gigachat_llms \
--model_args model="GigaChat",profanity_check=False\
--apply_chat_template
--tasks gsm8k \
--device cpu \
--write_out \
--log_samples \
--output_path './gsm8k.json'