Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ client = InferenceClient(
|
|
21 |
# Load pre-trained mixtral tokenizer model (replace with your desired model if you want)
|
22 |
model_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
23 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
24 |
-
model = AutoModel.from_pretrained(model_id)
|
25 |
|
26 |
# Function to convert text items into embeddings
|
27 |
def get_embeddings(text_items):
|
|
|
21 |
# Load pre-trained mixtral tokenizer model (replace with your desired model if you want)
|
22 |
model_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
23 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
24 |
+
model = AutoModel.from_pretrained(model_id, load_in_4bit=True, use_flash_attention_2=True)
|
25 |
|
26 |
# Function to convert text items into embeddings
|
27 |
def get_embeddings(text_items):
|