Recommended ollama modelfile to install?

#7
by arivero - opened

The model works fine with a standard template. I download the repository into the hf cache and then I create the Modelfile

FROM /home/kampal/.cache/huggingface/hub/models--BSC-LT--salamandra-7b-instruct/snapshots/e6c39f6092eb496f7feac065cf7a645bc792bbc6
TEMPLATE """
{{- range .Messages }}<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end }}<|im_start|>assistant
""""

and it goes well:

(venv) kampal@kampal4090:~$ ollama create salamandra7b -f salamandra-7b-instruct-Modelfile 
transferring model data 100% 
using cached layer sha256:8d113310ba85d754a212e2f15a9de3c7d24fb3c0620809e95c2474ade5b1724b 
using existing layer sha256:8d113310ba85d754a212e2f15a9de3c7d24fb3c0620809e95c2474ade5b1724b 
creating new layer sha256:b7b5f247c4e3106fa129fa5f1c2a50ac79987ca766340fb66cf860d7d8ff61d3 
creating new layer sha256:6e6b543a72c4b5f811a818f1818069b98eb5ac6433e328867da7ba962d523884 
writing manifest 
success 
(venv) kampal@kampal4090:~$ ollama run salamandra7b:latest
>>> hla
Hello there!" - that is the English greeting "Hi". It is an informal way to start a conversation. If 
you are looking for something more formal, consider using "Good day" or "Good morning". 
Would you like me to assist you in any other matter?

>>> me puedes decir a que instituto de unizar corresponde el BIFI?
BIFI" es una sigla que pertenece al Instituto de Biocomputación y Física de Sistemas Complejos, 
ubicado en la Universidad de Zaragoza. ¿Desea saber más sobre este Instituto?

But I note you recommend a more complex prompt, including date and general roles, and on the other hand I am not sure if the default temperature sampling etc are adequate. Can someone recommend a more complete Modelfile along the lines of https://github.com/ollama/ollama/blob/main/docs/modelfile.md Note that ollama uses Go templates instead of Jinja

Sign up or log in to comment