Downloads · 30 days
16
28% of all-time downloads
argilla/Mistral-7B-v0.1-chat-OIG
Mistral-7B-v0.1-chat-OIG is a machine learning model from argilla. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Mistral-7B-v0.1-chat-OIG is a LLM trained to act as a chat assistant, capable of subsequent prompting. It is finetuned from mistralai/Mistral-7B-v0.1 on 3k samples from the laion/OIG dataset. The training procedure in…
Downloads · 30 days
16
28% of all-time downloads
All-time downloads
57
Public
Repo size
13.7 MB
Likes
1
Public
Click a slice to open those files.
.bin13.7 MB · 88%
From the Hugging Face model README
Mistral-7B-v0.1-chat-OIG is a LLM trained to act as a chat assistant, capable of subsequent prompting. It is finetuned from mistralai/Mistral-7B-v0.1 on 3k samples from the laion/OIG dataset. The training procedure involves supervised finetuning from TRL.
from transformers import AutoTokenizer
from peft import AutoPeftModelForCausalLM
import torch
model_id = "argilla/Mistral-7B-v0.1-chat-OIG"
model = AutoPeftModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
tokenizer.pad_token_id = tokenizer.eos_token_id
text = "<human>: What were Nelson Mandela's relations with the ANC? <bot>:"
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(input_ids=inputs["input_ids"], max_new_tokens=250, pad_token_id=tokenizer.pad_token_id)
print(tokenizer.batch_decode(outputs, skip_special_tokens=False)[0])
<s><human>: {prompt} <bot>:
or
Background: {background} <s><human>: {prompt} <bot>:
<s><human>: {prompt_1} <bot>: {response_1}</s><s><human>: {prompt_2} <bot>: {response_2}</s><s><human>: {prompt_3} <bot>:
or
Background: {background} <s><human>: {prompt_1} <bot>: {response_1}</s><s><human>: {prompt_2} <bot>: {response_2}</s><s><human>: {prompt_3} <bot>:
<!--
### Model Sources
- **Tutorial:** ...
-->