Instructions to use openbmb/Eurus-RM-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/Eurus-RM-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="openbmb/Eurus-RM-7b", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("openbmb/Eurus-RM-7b", trust_remote_code=True) model = AutoModel.from_pretrained("openbmb/Eurus-RM-7b", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Using Mistral's chat_template produces different text than the demo.
#8
by EutronH - opened
For the following conversation, the input text using the template in the demo and the one using Mistral's chat_template are different.
Conversation: [{"role": "user", "content": "Hello"}, {"role": "assistant": "content": "How can I help you today?"}]
the input text using the template in the demo:
"[INST] Hello [/INST] How can I help you today?"the input text using Mistral's official tokenizer.chat_template:
"<s>[INST] Hello [/INST]How can I help you today?</s>"
There are totally three differences:
i. 2. has a bos token while 1. does not
ii. 2. has an eos token while 1. does not
iii. 1. has a space between "[/INST]" and "How" while 2. does not
Which one is the correct one?