Spaces:
Runtime error
Runtime error
back to community
Browse files
app.py
CHANGED
|
@@ -27,10 +27,11 @@ if not torch.cuda.is_available():
|
|
| 27 |
|
| 28 |
|
| 29 |
if torch.cuda.is_available():
|
| 30 |
-
model_id = "
|
| 31 |
model = AutoModelForCausalLM.from_pretrained(model_id,
|
|
|
|
| 32 |
# torch_dtype=torch.float16,
|
| 33 |
-
load_in_8bit=True,
|
| 34 |
trust_remote_code=True).to("cuda")
|
| 35 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 36 |
tokenizer.use_default_system_prompt = False
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
if torch.cuda.is_available():
|
| 30 |
+
model_id = "mistral-community/Mixtral-8x22B-v0.1-4bit"
|
| 31 |
model = AutoModelForCausalLM.from_pretrained(model_id,
|
| 32 |
+
device_map="auto",
|
| 33 |
# torch_dtype=torch.float16,
|
| 34 |
+
# load_in_8bit=True,
|
| 35 |
trust_remote_code=True).to("cuda")
|
| 36 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 37 |
tokenizer.use_default_system_prompt = False
|