Views
No views yet
1from llama_cpp import Llama
2
3llm = Llama.from_pretrained(
4 repo_id="rhoahndur/retrosynthesis-qwen3-4b-gguf",
5 filename="retrosynthesis-qwen3-4b-Q4_K_M.gguf",
6 n_ctx=512,
7)
8output = llm.create_chat_completion(
9 messages=[
10 {"role": "system", "content": "You are a retrosynthesis expert. Output ONLY reactant SMILES separated by dots."},
11 {"role": "user", "content": "Predict the reactants for: CC(=O)Oc1ccccc1C(=O)O"}
12 ],
13 max_tokens=256,
14 temperature=0.7,
15)
16print(output["choices"][0]["message"]["content"])