study-hjt commited on
Commit
c8e3921
1 Parent(s): de2ab4a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -9,6 +9,7 @@ pipeline_tag: text-generation
9
  tags:
10
  - chat
11
  - gptq
 
12
  - int8
13
  studios:
14
  - qwen/CodeQwen1.5-7b-Chat-demo
@@ -54,15 +55,15 @@ KeyError: 'qwen2'.
54
  Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
55
 
56
  ```python
57
- from modelscope import AutoModelForCausalLM, AutoTokenizer
58
  device = "cuda" # the device to load the model onto
59
 
60
  model = AutoModelForCausalLM.from_pretrained(
61
- "huangjintao/CodeQwen1.5-7B-Chat-GPTQ-Int8",
62
  torch_dtype="auto",
63
  device_map="auto"
64
  )
65
- tokenizer = AutoTokenizer.from_pretrained("huangjintao/CodeQwen1.5-7B-Chat-GPTQ-Int8")
66
 
67
  prompt = "Write a quicksort algorithm in python."
68
  messages = [
 
9
  tags:
10
  - chat
11
  - gptq
12
+ - codeqwen
13
  - int8
14
  studios:
15
  - qwen/CodeQwen1.5-7b-Chat-demo
 
55
  Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
56
 
57
  ```python
58
+ from transformers import AutoModelForCausalLM, AutoTokenizer
59
  device = "cuda" # the device to load the model onto
60
 
61
  model = AutoModelForCausalLM.from_pretrained(
62
+ "study-hjt/CodeQwen1.5-7B-Chat-GPTQ-Int8",
63
  torch_dtype="auto",
64
  device_map="auto"
65
  )
66
+ tokenizer = AutoTokenizer.from_pretrained("study-hjt/CodeQwen1.5-7B-Chat-GPTQ-Int8")
67
 
68
  prompt = "Write a quicksort algorithm in python."
69
  messages = [