galatolofederico / cerbero-7b

Cerbero-7b is the first 100% Free and Open Source Italian Large Language Model (LLM) ready to be used for research or commercial applications.
35 stars 0 forks source link

Cerbero start a loop of questions and answers #2

Closed ACarloGitHub closed 2 weeks ago

ACarloGitHub commented 2 months ago

Hello and thank you for creating a model capable of interacting with a user by expressing himself in Italian that is fluent and credible. I'm doing some experimenting with the Cerbero gguf model, openchat. I'm trying to use it with Ollama. To do this I created a modelfile in which I am trying to find the most suitable template so that the model is recognized with a specific name and responds exclusively to a question, without entering a question and answer loop (Umano-Assistente and so on). Using the chat template suggested by you

( """Questa è una conversazione tra un umano ed un assistente AI. [|Umano|] Come posso distinguere un AI da un umano? [|Assistente|]""" )

the model begins a question and answer loop. I then opted for a different template, implementing the suggestions of other Ollama users

TEMPLATE """[INST] <>{{ .System }}<>

{{ .Prompt }} [/INST] """ SYSTEM """You are an AI called Cerbero""" PARAMETER stop [INST] PARAMETER stop [/INST] PARAMETER stop <> PARAMETER stop <>

In this way the Cerbero responds exclusively to the question posed by the user, but does not include the prefixes Umano and Assistente in the chat cycles. I would like to know if there is a template suggested by you that replaces the one created by me because: 1) when ollama uses all the system's RAM the model stops responding as expected and returns to the loop phase, alternating the Umano-Assistente cycle. 2) how do I include a name other than Umano or Assistente that remains as the initial prefix of each question and each answer?

Thanks

galatolofederico commented 2 months ago

Hi, you need to configure the Modelfile slightly before using it with Ollama. I have created an appropriate Modelfile for both cerbero-7b and cerbero-7b-openchat and pushed them to the Ollama hub. To use cerbero-7b in Ollama, simply run:

ollama run galatolo/cerbero-7b

or

ollama run galatolo/cerbero-7b-openchat
ACarloGitHub commented 2 months ago

Thank you for your effort and for your kind reply. I will try your models directly from Ollama then🤗