captain-awesome commited on
Commit
b371097
·
verified ·
1 Parent(s): cf4cc62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -64,22 +64,21 @@ def main():
64
  # Load model, set prompts, create vector database, and retrieve answer
65
  try:
66
  start = timeit.default_timer()
67
- config = {
68
- 'max_new_tokens': 1024,
69
- 'repetition_penalty': 1.1,
70
- 'temperature': 0.1,
71
- 'top_k': 50,
72
- 'top_p': 0.9,
73
- 'stream': True,
74
- 'threads': int(os.cpu_count() / 2)
75
- }
76
 
77
  llm = CTransformers(
78
- model="TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF",
79
- model_file="mistral-7b-instruct-v0.2.Q4_0.gguf",
80
  model_type="mistral",
81
- lib="avx2", #for CPU use
82
- **config
83
  )
84
 
85
  print("LLM Initialized...")
 
64
  # Load model, set prompts, create vector database, and retrieve answer
65
  try:
66
  start = timeit.default_timer()
67
+ # config = {
68
+ # 'max_new_tokens': 1024,
69
+ # 'repetition_penalty': 1.1,
70
+ # 'temperature': 0.1,
71
+ # 'top_k': 50,
72
+ # 'top_p': 0.9,
73
+ # 'stream': True,
74
+ # 'threads': int(os.cpu_count() / 2)
75
+ # }
76
 
77
  llm = CTransformers(
78
+ model = "mistral-7b-instruct-v0.1.Q4_K_S.gguf",
 
79
  model_type="mistral",
80
+ max_new_tokens = 1048,
81
+ temperature = 0.3
82
  )
83
 
84
  print("LLM Initialized...")