Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
|
7 |
import torch
|
8 |
import os
|
9 |
import bitnet
|
10 |
-
os.system('pip install mamba-ssm causal-conv1d>=1.2.0')
|
11 |
key = os.environ.get("key")
|
12 |
from huggingface_hub import login
|
13 |
login(key)
|
@@ -21,7 +20,7 @@ nf4_config = BitsAndBytesConfig(
|
|
21 |
bnb_4bit_use_double_quant=True,
|
22 |
bnb_4bit_compute_dtype=torch.bfloat16
|
23 |
)
|
24 |
-
model_id = "
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
26 |
model = AutoModelForCausalLM.from_pretrained(model_id,
|
27 |
# load_in_8bit=True,
|
|
|
7 |
import torch
|
8 |
import os
|
9 |
import bitnet
|
|
|
10 |
key = os.environ.get("key")
|
11 |
from huggingface_hub import login
|
12 |
login(key)
|
|
|
20 |
bnb_4bit_use_double_quant=True,
|
21 |
bnb_4bit_compute_dtype=torch.bfloat16
|
22 |
)
|
23 |
+
model_id = "IEITYuan/Yuan2-M32-hf"
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
25 |
model = AutoModelForCausalLM.from_pretrained(model_id,
|
26 |
# load_in_8bit=True,
|