marcodambra commited on
Commit
adc93ab
·
verified ·
1 Parent(s): fb2fbd7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -8
README.md CHANGED
@@ -50,8 +50,10 @@ llm = Llama(
50
  )
51
 
52
  # Simple inference example
 
 
53
  output = llm(
54
- "[INST] {prompt} [/INST]", # Prompt
55
  max_tokens=512, # Generate up to 512 tokens
56
  stop=["[INST]"], # Example stop token
57
  echo=True # Whether to echo the prompt
@@ -62,13 +64,7 @@ output = llm(
62
  llm = Llama(model_path="/path/to/model.gguf", chat_format="mistral-instruct")
63
  response = llm.create_chat_completion(
64
  messages = [
65
- {"role": "system", "content": "You are a story writing assistant."},
66
- {
67
- "role": "user",
68
- "content": "Qual è il tuo piatto preferito??"
69
- },
70
- {"role": "assistant", "content": "Beh, ho un debole per una buona porzione di risotto allo zafferano. È un piatto che si distingue per il suo sapore ricco e il suo bellissimo colore dorato, rendendolo irresistibile!"},
71
- {"role": "user", "content": "Hai delle ricette con il risotto che consigli?"},
72
  ]
73
  )
74
 
 
50
  )
51
 
52
  # Simple inference example
53
+ prompt = "Sample prompt"
54
+
55
  output = llm(
56
+ f"[INST] {prompt} [/INST]", # Prompt
57
  max_tokens=512, # Generate up to 512 tokens
58
  stop=["[INST]"], # Example stop token
59
  echo=True # Whether to echo the prompt
 
64
  llm = Llama(model_path="/path/to/model.gguf", chat_format="mistral-instruct")
65
  response = llm.create_chat_completion(
66
  messages = [
67
+ {"role": "user", "content": prompt},
 
 
 
 
 
 
68
  ]
69
  )
70