Spaces:
Sleeping
Sleeping
CyberNative
commited on
Commit
•
b19b217
1
Parent(s):
f61b980
Update app.py
Browse files
app.py
CHANGED
@@ -45,12 +45,13 @@ h1 {
|
|
45 |
"""
|
46 |
|
47 |
# Load the tokenizer and model
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
terminators = [
|
52 |
tokenizer.eos_token_id,
|
53 |
-
tokenizer.convert_tokens_to_ids("<|
|
54 |
]
|
55 |
|
56 |
@spaces.GPU(duration=120)
|
|
|
45 |
"""
|
46 |
|
47 |
# Load the tokenizer and model
|
48 |
+
with torch.autocast(device_type='cpu'):
|
49 |
+
tokenizer = AutoTokenizer.from_pretrained("CyberNative-AI/Colibri_8b_v0.1_gptq_128_4bit")
|
50 |
+
model = AutoGPTQForCausalLM.from_quantized("CyberNative-AI/Colibri_8b_v0.1_gptq_128_4bit", dtype=torch.bfloat16, device="cpu")
|
51 |
|
52 |
terminators = [
|
53 |
tokenizer.eos_token_id,
|
54 |
+
tokenizer.convert_tokens_to_ids("<|im_end|>")
|
55 |
]
|
56 |
|
57 |
@spaces.GPU(duration=120)
|