Text2Text Generation
GGUF
German
Inference Endpoints
costrau commited on
Commit
4db4383
1 Parent(s): cd8859c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -2
README.md CHANGED
@@ -50,11 +50,17 @@ a low temperature for generation results in somewhat realistic quotes that at le
50
  import torch
51
  from ctransformers import AutoModelForCausalLM
52
 
53
- from transformers import pipeline
54
-
55
  base_model = AutoModelForCausalLM.from_pretrained(
56
  "caretech-owl/leo-hessionai-7B-quotes-gguf", model_type="llama")
57
 
 
 
 
 
 
 
 
 
58
  def get_quote(author:str, max_new_tokens:int=200):
59
  query = prompt_format.format(system_prompt=system_prompt, prompt= author)
60
  output = base_model(query, stop='<|im_end|>', max_new_tokens=max_new_tokens)
 
50
  import torch
51
  from ctransformers import AutoModelForCausalLM
52
 
 
 
53
  base_model = AutoModelForCausalLM.from_pretrained(
54
  "caretech-owl/leo-hessionai-7B-quotes-gguf", model_type="llama")
55
 
56
+ system_prompt = """Dies ist eine Unterhaltung zwischen \
57
+ einem intelligenten, hilfsbereitem \
58
+ KI-Assistenten und einem Nutzer.
59
+ Der Assistent gibt Antworten in Form von Zitaten."""
60
+ prompt_format = "<|im_start|>system\n{system_prompt}\
61
+ <|im_end|>\n<|im_start|>user\nZitiere {prompt}\
62
+ <|im_end|>\n<|im_start|>assistant\n"
63
+
64
  def get_quote(author:str, max_new_tokens:int=200):
65
  query = prompt_format.format(system_prompt=system_prompt, prompt= author)
66
  output = base_model(query, stop='<|im_end|>', max_new_tokens=max_new_tokens)