Spaces:
Runtime error
Runtime error
Commit
·
b8a520c
1
Parent(s):
74205fd
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,9 +6,9 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
| 6 |
from transformers.generation import GenerationConfig
|
| 7 |
|
| 8 |
# Initialize model and tokenizer
|
| 9 |
-
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True)
|
| 10 |
-
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True).eval()
|
| 11 |
-
model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True)
|
| 12 |
|
| 13 |
# Postprocess function
|
| 14 |
def postprocess(self, y):
|
|
|
|
| 6 |
from transformers.generation import GenerationConfig
|
| 7 |
|
| 8 |
# Initialize model and tokenizer
|
| 9 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-14B-Chat-int4", trust_remote_code=True)
|
| 10 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat-int4", device_map="auto", trust_remote_code=True).eval()
|
| 11 |
+
model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-14B-Chat-int4", trust_remote_code=True)
|
| 12 |
|
| 13 |
# Postprocess function
|
| 14 |
def postprocess(self, y):
|