chatglm-6b-int4 / demo_call_api.py
NewBreaker's picture
auto git
8ba09aa
raw
history blame
562 Bytes
from transformers import AutoModel,AutoTokenizer
model = AutoModel.from_pretrained("NewBreaker/chatglm-6b-int4",trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("NewBreaker/chatglm-6b-int4", trust_remote_code=True)
from transformers import AutoConfig
config = AutoConfig.from_pretrained("bert-base-cased")
# Push the config to your namespace with the name "my-finetuned-bert".
config.push_to_hub("my-finetuned-bert")
# Push the config to an organization with the name "my-finetuned-bert".
config.push_to_hub("huggingface/my-finetuned-bert")