Instructions to use AICube/ChatGLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AICube/ChatGLM with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("THUDM/chatglm3-6b-base") model = PeftModel.from_pretrained(base_model, "AICube/ChatGLM") - Notebooks
- Google Colab
- Kaggle
Download trainer_config.yaml from AICube/ChatGLM: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/AICube/ChatGLM/resolve/main/trainer_config.yaml
- Command line
-
hf download hf://AICube/ChatGLM/trainer_config.yaml
-
curl -L -o trainer_config.yaml https://huggingface.co/AICube/ChatGLM/resolve/main/trainer_config.yaml
590 Bytes
| cutoff_len: 1024 | |
| dataset: im_the_fated_villain_chapters | |
| dataset_dir: data | |
| do_train: true | |
| finetuning_type: lora | |
| flash_attn: auto | |
| gradient_accumulation_steps: 8 | |
| learning_rate: 2.0e-05 | |
| logging_steps: 5 | |
| lora_alpha: 16 | |
| lora_dropout: 0 | |
| lora_rank: 8 | |
| lora_target: query_key_value | |
| lr_scheduler_type: cosine | |
| max_grad_norm: 1.0 | |
| max_samples: 100000 | |
| model_name_or_path: THUDM/chatglm3-6b-base | |
| num_train_epochs: 1.0 | |
| optim: adamw_torch | |
| output_dir: saves/ChatGLM3-6B-Base/lora/test1 | |
| packing: false | |
| per_device_train_batch_size: 2 | |
| report_to: none | |
| save_steps: 100 | |
| stage: sft | |
| template: default | |
| warmup_steps: 0 | |