Downloads · 30 days
26
2% of all-time downloads
rudrashah/RLM-spell-checker
RLM-spell-checker is a text generation model from rudrashah. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
The RLM-spell-checker is a fine-tuned version of gemma-2b-V3, enhanced using LoRA (Low-Rank Adaptation) to specialize in spelling correction. LoRA fine-tunes models efficiently by adjusting only a few parameters, allo…
Downloads · 30 days
26
2% of all-time downloads
All-time downloads
1.1K
Public
Parameters
2.5B
10 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors10 GB · 100%
From the Hugging Face model README
The RLM-spell-checker is a fine-tuned version of gemma-2b-V3, enhanced using LoRA (Low-Rank Adaptation) to specialize in spelling correction. LoRA fine-tunes models efficiently by adjusting only a few parameters, allowing the RLM-spell-checker to retain the robust language understanding of gemma-2b-V3 while focusing on identifying and correcting spelling errors. This fine-tuning enables the model to provide context-aware suggestions for corrections, making it a powerful tool for real-time applications like automated writing assistance, chatbots, and word processors. By improving spelling accuracy without interrupting the natural flow of text, the RLM-spell-checker enhances text quality and user experience in various tasks.
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rudrashah/RLM-spell-checker")
model = AutoModelForCausalLM.from_pretrained("rudrashah/RLM-spell-checker")
sent = "Whaat iss the mision?"
template = "Sentence:\n{org}\n\nCorrect_Grammar:\n{new}"
input_text = template.format(org=sent, new="")
input_ids = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**input_ids, max_new_tokens=128)
print(tokenizer.decode(outputs[0]))