Run this model with HF Jobs
Run zai-org/chatglm2-6b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/zai-org/chatglm2-6b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/zai-org/chatglm2-6b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use zai-org/chatglm2-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/chatglm2-6b with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm2-6b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
RuntimeError: DefaultCPUAllocator: not enough memory: you tried to allocate 224395264 bytes.
2023-09-14 16:55:40 ERROR:Failed to load the model.
Traceback (most recent call last):
File "E:\oobabooga_windows\oobabooga_windows\text-generation-webui\modules\ui_model_menu.py", line 194, in load_model_wrapper
shared.model, shared.tokenizer = load_model(shared.model_name, loader)
File "E:\oobabooga_windows\oobabooga_windows\text-generation-webui\modules\models.py", line 77, in load_model
output = load_func_maploader
File "E:\oobabooga_windows\oobabooga_windows\text-generation-webui\modules\models.py", line 222, in huggingface_loader
model = LoaderClass.from_pretrained(checkpoint, **params)
File "E:\oobabooga_windows\oobabooga_windows\installer_files\env\lib\site-packages\transformers\models\auto\auto_factory.py", line 558, in from_pretrained
return model_class.from_pretrained(
File "E:\oobabooga_windows\oobabooga_windows\installer_files\env\lib\site-packages\transformers\modeling_utils.py", line 3175, in from_pretrained
) = cls._load_pretrained_model(
File "E:\oobabooga_windows\oobabooga_windows\installer_files\env\lib\site-packages\transformers\modeling_utils.py", line 3563, in _load_pretrained_model
new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model(
File "E:\oobabooga_windows\oobabooga_windows\installer_files\env\lib\site-packages\transformers\modeling_utils.py", line 710, in _load_state_dict_into_meta_model
param = param.to(dtype)
RuntimeError: [enforce fail at ..\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 224395264 bytes.