robertolofaro commited on
Commit
a88c391
·
verified ·
1 Parent(s): 84f64c0

Delete qa_markdown_fast.py

Browse files
Files changed (1) hide show
  1. qa_markdown_fast.py +0 -28
qa_markdown_fast.py DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env python3
2
- from qa_common import parse_args, build_prompt, generate_answer, save_result
3
- from llama_cpp import Llama
4
-
5
- # ====================== CONFIG ======================
6
- MODEL_PATH = "articles-Q4_K_M.gguf"
7
-
8
- print("Loading GGUF model...")
9
- llm = Llama(
10
- model_path=MODEL_PATH,
11
- n_ctx=8192,
12
- n_threads=8,
13
- verbose=False,
14
- )
15
-
16
- def answer(query: str):
17
- prompt = build_prompt(query, context="") # No context = pure model
18
- return generate_answer(llm, prompt, max_tokens=1100)
19
-
20
-
21
- if __name__ == "__main__":
22
- args = parse_args()
23
- query = args.prompt if args.prompt else input("\nQuestion: ")
24
-
25
- print("Generating answer using fine-tuned model (Fast Mode)...\n")
26
-
27
- answer_text = answer(query)
28
- save_result(query, answer_text, args.output)