Instructions to use cczhong/internlm-chat-7b-4bit-gptq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cczhong/internlm-chat-7b-4bit-gptq with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="cczhong/internlm-chat-7b-4bit-gptq", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cczhong/internlm-chat-7b-4bit-gptq", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
how to use
need install "pip install git+https://github.com/cczhong11/AutoGPTQ" before https://github.com/PanQiWei/AutoGPTQ/pull/189 got merged
from transformers import AutoTokenizer, AutoModelForCausalLM
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
quantized_model_dir = "cczhong/internlm-chat-7b-4bit-gptq"
tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir, trust_remote_code=True)
model = AutoGPTQForCausalLM.from_quantized(quantized_model_dir, device="cuda:0",trust_remote_code=True)
response, history = model.chat(tokenizer, "你好", history=[])
- Downloads last month
- 10