RLM-spell-checker / README.md
rudrashah's picture
Update README.md
200311b verified
|
raw
history blame
834 Bytes
metadata
base_model:
  - google/gemma-2-2b-it
pipeline_tag: text-generation
metrics:
  - accuracy

Description

RLM-spell-checker is a fined-tuned version of gemma-2b-V3. This model is fined-tuned using LoRA.

Author: Rudra Shah

Running Model

# 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]))