Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -11,8 +11,8 @@ class InferenceRequest(BaseModel):
|
|
11 |
|
12 |
app = FastAPI()
|
13 |
|
14 |
-
llm = Llama(model_path="./models/
|
15 |
-
verbose=False, n_ctx=
|
16 |
|
17 |
|
18 |
@app.get("/")
|
@@ -32,7 +32,7 @@ async def inference(request: InferenceRequest):
|
|
32 |
# process request
|
33 |
try:
|
34 |
result = llm(input_text, temperature=0.2,
|
35 |
-
top_k=5, max_tokens=max_tokens)
|
36 |
return result
|
37 |
except:
|
38 |
pass
|
|
|
11 |
|
12 |
app = FastAPI()
|
13 |
|
14 |
+
llm = Llama(model_path="./models/mistral-7b-openorca.Q4_K_S.gguf",
|
15 |
+
verbose=False, n_ctx=8192)
|
16 |
|
17 |
|
18 |
@app.get("/")
|
|
|
32 |
# process request
|
33 |
try:
|
34 |
result = llm(input_text, temperature=0.2,
|
35 |
+
top_k=5, max_tokens=max_tokens, stop=["<|im_end|>"])
|
36 |
return result
|
37 |
except:
|
38 |
pass
|