Downloads · 30 days
47
21% of all-time downloads
mevsg/rumi-correction-v1
rumi-correction-v1 is a text generation model from mevsg. Use it when you need the model to write or continue text. It is set up for transformers.
This model is trained with QLoRA with parameters r = loraalpha = 4.
Downloads · 30 days
47
21% of all-time downloads
All-time downloads
219
Public
Parameters
9.2B
37 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors18.5 GB · 100%
From the Hugging Face model README
This model is trained with QLoRA with parameters r = lora_alpha = 4.
Use the code below to get started with the model:
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
trained_model = AutoModelForCausalLM.from_pretrained(
"culturalheritagenus/rumi-correction-v1.1",
device_map="auto",
torch_dtype=torch.bfloat16
)
trained_tokenizer = AutoTokenizer.from_pretrained("culturalheritagenus/rumi-correction-v1.1")
To perform inference:
messages = [
{"role": "user", "content": "You are a Malay language spelling corrector. I will give you some text written in messy Rumi (shortened or mistyped). Rewrite it in correct Malay Rumi spelling.\naurng ank. yngdim dimn anm aurngdan"},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize = True,
add_generation_prompt = True, # Must add for generation
return_tensors = "pt",
).to("cuda")
text_streamer = TextStreamer(tokenizer)
_ = trained_model.generate(input_ids = inputs, streamer = text_streamer, max_new_tokens = 128, use_cache = True)
The model was trained on culturalheritagenus/rumi-correction-v1.1-data-v3
To replicate this model, please refer to the provided script and below. Ensure that the versions of all languages and libraries are the same.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
hyhyhyhyyhyh