Downloads · 30 days
15
5% of all-time downloads
arthurangelici/opt-6.7b-lora-caramelo
opt-6.7b-lora-caramelo is a text generation model from arthurangelici. Use it when you need the model to write or continue text. It is set up for adapter-transformers. The card lists the license as other.
Opt-6.7B-lora-caramelo is further pre-train Facebook's OPT-6.78 model using casual language modeling on wikipedia-portuguese version [05/04/2023].
Downloads · 30 days
15
5% of all-time downloads
All-time downloads
313
Public
Repo size
33.6 MB
Likes
2
Public
Click a slice to open those files.
.bin33.6 MB · 94%
From the Hugging Face model README
Opt-6.7B-lora-caramelo is further pre-train Facebook's OPT-6.78 model using casual language modeling on wikipedia-portuguese version [05/04/2023].
This model is intended to be used with fine-tuning, supervision, and/or moderation. I recommend having a human curate or filter the outputs.
import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
peft_model_id = "arthurangelici/opt-6.7b-lora-caramelo"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
# Load the Lora model
model = PeftModel.from_pretrained(model, peft_model_id)
batch = tokenizer("Caramelo é um simbolo do: ", return_tensors='pt')
with torch.cuda.amp.autocast():
output_tokens = model.generate(**batch, max_new_tokens=50)
print('\n\n', tokenizer.decode(output_tokens[0], skip_special_tokens=True))
The model is licensed under the OPT-6.75B license, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
@misc{zhang2022opt,
title={OPT: Open Pre-trained Transformer Language Models},
author={Susan Zhang and Stephen Roller and Naman Goyal and Mikel Artetxe and Moya Chen and Shuohui Chen and Christopher Dewan and Mona Diab and Xian Li and Xi Victoria Lin and Todor Mihaylov and Myle Ott and Sam Shleifer and Kurt Shuster and Daniel Simig and Punit Singh Koura and Anjali Sridhar and Tianlu Wang and Luke Zettlemoyer},
year={2022},
eprint={2205.01068},
archivePrefix={arXiv},
primaryClass={cs.CL}
}