gemma-2b-openhermes is a variant of the Gemma 2B language model, which has been further fine-tuned on the OpenHermes-2.5 preference dataset
using QLoRA.
The instruction-tuned models use a chat template that must be adhered to for conversational use.
The easiest way to apply it is using the tokenizer's built-in chat template, as shown in the following snippet.
Let's load the model and apply the chat template to a conversation. In this example, we'll start with a single user interaction:
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
model_id = "abideen/gemma-2b-openhermes"
dtype = torch.bfloat16
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="cuda",
torch_dtype=dtype,
)
chat = [{ "role": "user", "content": "What is a Language Model?" }]
prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
After the prompt is ready, generation can be performed like this:
gemma-2b-openhermes huggingface.co is an AI model on huggingface.co that provides gemma-2b-openhermes's model effect (), which can be used instantly with this abideen gemma-2b-openhermes model. huggingface.co supports a free trial of the gemma-2b-openhermes model, and also provides paid use of the gemma-2b-openhermes. Support call gemma-2b-openhermes model through api, including Node.js, Python, http.
gemma-2b-openhermes huggingface.co is an online trial and call api platform, which integrates gemma-2b-openhermes's modeling effects, including api services, and provides a free online trial of gemma-2b-openhermes, you can try gemma-2b-openhermes online for free by clicking the link below.
abideen gemma-2b-openhermes online free url in huggingface.co:
gemma-2b-openhermes is an open source model from GitHub that offers a free installation service, and any user can find gemma-2b-openhermes on GitHub to install. At the same time, huggingface.co provides the effect of gemma-2b-openhermes install, users can directly use gemma-2b-openhermes installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
gemma-2b-openhermes install url in huggingface.co: