Iliassti commited on
Commit
78daae7
·
1 Parent(s): 886dba6

pip install accelerate

Browse files
Files changed (2) hide show
  1. app.py +2 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -27,7 +27,7 @@ class LegalExpert:
27
  )
28
 
29
  # falcon model
30
- model_name = "tiiuae/falcon-40b-instruct"
31
  tokenizer = AutoTokenizer.from_pretrained(model_name)
32
  custom_pipeline = pipeline("text-generation",
33
  model=model_name,
@@ -36,8 +36,7 @@ class LegalExpert:
36
  trust_remote_code=True,
37
  device_map="auto")
38
 
39
- self.falcon = custom_pipeline(
40
- max_length=200,
41
  do_sample=True,
42
  top_k=10,
43
  num_return_sequences=1,
 
27
  )
28
 
29
  # falcon model
30
+ model_name = "tiiuae/falcon-7b-instruct"
31
  tokenizer = AutoTokenizer.from_pretrained(model_name)
32
  custom_pipeline = pipeline("text-generation",
33
  model=model_name,
 
36
  trust_remote_code=True,
37
  device_map="auto")
38
 
39
+ self.falcon = custom_pipeline( max_length=200,
 
40
  do_sample=True,
41
  top_k=10,
42
  num_return_sequences=1,
requirements.txt CHANGED
@@ -8,4 +8,5 @@ transformers
8
  tensorflow
9
  tensorflow_text
10
  torch
11
- einops
 
 
8
  tensorflow
9
  tensorflow_text
10
  torch
11
+ einops
12
+ accelerate