Spaces:
Runtime error
Runtime error
mohammad-gh009
commited on
Commit
·
ccfca8d
1
Parent(s):
8d0b34d
update
Browse files- app.py +3 -2
- requirements.txt +2 -0
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
|
|
|
| 3 |
"""
|
| 4 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 5 |
"""
|
|
@@ -7,7 +8,7 @@ For more information on `huggingface_hub` Inference API support, please check th
|
|
| 7 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 8 |
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained("Moreza009/aya23-8b-double-quantized")
|
| 10 |
-
model = AutoModelForCausalLM.from_pretrained("Moreza009/aya23-8b-double-quantized")
|
| 11 |
|
| 12 |
|
| 13 |
def respond(
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import accelerate
|
| 3 |
+
import bitsandbytes
|
| 4 |
"""
|
| 5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 6 |
"""
|
|
|
|
| 8 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 9 |
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained("Moreza009/aya23-8b-double-quantized")
|
| 11 |
+
model = AutoModelForCausalLM.from_pretrained("Moreza009/aya23-8b-double-quantized",device_map="auto")
|
| 12 |
|
| 13 |
|
| 14 |
def respond(
|
requirements.txt
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
torch
|
| 2 |
transformers
|
| 3 |
huggingface_hub==0.22.2
|
|
|
|
| 1 |
+
accelerate
|
| 2 |
+
bitsandbytes
|
| 3 |
torch
|
| 4 |
transformers
|
| 5 |
huggingface_hub==0.22.2
|