Update chat_templates.py

This commit is contained in:
Daniel Han 2024-09-30 23:08:46 -07:00
commit e1b0b8f6ef

View file

@ -1606,6 +1606,9 @@ extra_eos_tokens = None,
ollama_eos = get_ollama_eos_tokens(tokenizer, extra_eos_tokens)
ollama_eos = '\n'.join(f'PARAMETER stop "{eos}"' for eos in ollama_eos)
# Add temperature and min_p to counteract gibberish
ollama_eos += "\nPARAMETER temperature 1.5\nPARAMETER min_p 0.1"
# Ollama modelfile
part = '"""'
modelfile = 'FROM {__FILE_LOCATION__}\n\n'\