SantiagoMoreno-UdeA commited on
Commit
488ac27
1 Parent(s): 9e49f69

No GPU - Q8

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +3 -1
app.py CHANGED
@@ -8,7 +8,7 @@ For more information on `huggingface_hub` Inference API support, please check th
8
  """
9
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
11
- pipe = pipeline("text-generation", model="HiTZ/latxa-7b-v1", device=0)
12
 
13
 
14
  def respond(
 
8
  """
9
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
11
+ pipe = pipeline("text-generation", model="HiTZ/latxa-7b-v1", device_map="auto", model_kwargs={"load_in_8bit": True})
12
 
13
 
14
  def respond(
requirements.txt CHANGED
@@ -1,3 +1,5 @@
1
  huggingface_hub==0.22.2
2
  transformers
3
- torch
 
 
 
1
  huggingface_hub==0.22.2
2
  transformers
3
+ torch
4
+ accelerate
5
+ bitsandbytes