Views
No views yet
1from llama_cpp import Llama
2
3llm = Llama(
4 model_path="Llama-3.2-3B-Psychology-FP16.gguf",
5 n_ctx=2048,
6 n_threads=8
7)
8
9# Retrieve context from psychology textbook first
10context = "..." # Your RAG context here
11
12prompt = f"""[INST] The following context is from a psychology textbook:
13
14{context}
15
16Based on the context above, generate 1 multiple-choice question about classical conditioning.
17[/INST]"""
18
19output = llm(prompt, max_tokens=250, temperature=0.2)
20print(output['choices'][0]['text'])