lu-ny commited on
Commit
0962473
·
1 Parent(s): 8ba981b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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):