OpenHermes 2 Mistral 7B PTBR: Portuguese Fine-tune Guide
Learn about OpenHermesV2 PTBR, a Brazilian Portuguese fine-tune of OpenHermes 2 Mistral 7B: prompt format, usage, settings and license.
On this page
OpenHermes 2 Mistral 7B PTBR: Portuguese Chat, Coding and Roleplay
OpenHermesV2 PTBR is a Brazilian Portuguese fine-tune of OpenHermes 2 Mistral 7B, published on Hugging Face by ArtificialGuyBR. It keeps everything that made the original model popular — strong instruction following, ChatML formatting and OpenAI-compatible chat — and adapts it to respond in Portuguese. Here is what you need to know to run it.
- Base model: OpenHermes 2 Mistral 7B (Teknium's fine-tune of
mistralai/Mistral-7B-v0.1) - Prompt format: ChatML with
<|im_start|>/<|im_end|>tokens and system-prompt support - License: Apache 2.0, free for commercial and personal use
What the model does
OpenHermes 2 Mistral 7B was trained on roughly 900,000 entries of mostly GPT-4 generated data collected from open datasets, per the model card. The datasets were filtered and converted to ShareGPT, then to the ChatML format using axolotl. The PTBR release is a further fine-tune of that model, so it inherits the same capabilities — assistance, programming Q&A, roleplay and multi-turn dialogue — while answering in Portuguese.
The Hugging Face page shows example outputs for programming chat, gourmet recipes, philosophical conversations about the model's own "consciousness" and roleplay in the world of Fullmetal Alchemist. The author describes it as a personal project made "just for fun/testing", so treat it as an experiment rather than a production model.
Prompt format: ChatML
Like OpenHermes 2, this model uses the ChatML chat template. System prompts matter: the model was trained to use them to follow instructions that span many turns. A full prompt looks like this:
<|im_start|>system
You are "Hermes 2", an artificial intelligence developed by Teknium.<|im_end|>
<|im_start|>user
Hello, who are you?<|im_end|>
<|im_start|>assistant
Hi there! I'm Hermes 2.<|im_end|>
The format maps directly to the OpenAI chat API, so endpoints built for it accept the same message structure. In transformers, use the bundled chat template instead of hand-building the string:
messages = [
{"role": "system", "content": "Você é Hermes 2."},
{"role": "user", "content": "Olá, quem é você?"}
]
gen_input = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
model.generate(**gen_input)
Set add_generation_prompt=True so the template appends <|im_start|>assistant\n and the model continues with its reply. On the original cards, the author recommends LM Studio for chatting: it runs GGUF quantizations on llama.cpp, offers a ChatGPT-like interface and supports ChatML out of the box — just select the ChatML prefix in the settings pane.
Recommended settings
The model card does not list sampler settings for this PTBR release. As a rule of thumb for Mistral-7B ChatML models, temperature around 0.7 with default top-p usually works well for general chat, and lower temperatures keep coding answers more deterministic — but nothing here is specified by the author, so tune to taste.
Example images
No sample images are bundled with the Hugging Face release, since this is a text-generation model, so this guide has no gallery. The model card itself embeds screenshots of example conversations for reference.
Common errors and fixes
Error | Cause | Fix | Source
|---|---|---|---
The model answers in English | No instruction forcing Portuguese | Add a system prompt such as "Sempre responda em português brasileiro." | Model card Garbled or truncated output in LM Studio | Wrong template selected | Choose the ChatML prefix in LM Studio's settings pane | Model card The generation stops before an assistant turn | Missing generation prompt | Call apply_chat_template(..., add_generation_prompt=True) | Model card
FAQ
What base model is OpenHermesV2 PTBR built on? Mistral-7B-v0.1, through Teknium's OpenHermes 2 Mistral 7B fine-tune. See the base model tag on the Hugging Face model card.
What license does it use? Apache 2.0, so it can be used commercially, modified and redistributed with attribution.
Does it support system prompts? Yes. ChatML is built around <|im_start|>system turns, and OpenHermes 2 was trained to use system instructions across multi-turn conversations.
Sources
- artificialguybr/OpenHermesV2-PTBR — Hugging Face: model card, prompt format, training details and license.
- Related reads on this portfolio: the original OpenHermes 2 Mistral 7B, Mistral 7B architecture notes and an introduction to ChatML prompt templates.