shanaka95

shanaka95

gemma-4-2b-finetuned-grammar2

Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

🎯 Intended Uses & Capabilities

This model is explicitly trained to follow natural language instructions for text revision tasks. You can prompt it to perform various editing operations:

  • Grammatical Error Correction (GEC): "Fix grammatical errors in this sentence: ..."
  • Text Simplification: "Make this text easier to understand: ..."
  • Paraphrasing: "Rewrite this sentence in a different way: ..."
  • Formality Transfer: "Make this text more formal: ..."
  • Coherence & Flow: "Improve the flow and coherence of this paragraph: ..."
  • Neutralization: "Make this sentence more neutral: ..."

Out-of-Scope Use

While highly capable at text revision, this model is not designed for open-ended chatbot conversations, long-form creative story generation, or answering factual trivia. Its strength lies in structural and stylistic transformations of existing text.


💻 How to Use

You can easily load and use this model via the transformers library.

python

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "shanaka95/your-model-name-here" # Replace with your actual repo name
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.float16
)
# Format the input prompt (Instruction + Source Text)
instruction = "Fix all grammatical errors in this text:"
source_text = "When I grow up, I start to understand what he said is quite right."
prompt = f"{instruction} {source_text}"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
# Generate the edited text
outputs = model.generate(**inputs, max_new_tokens=128)
edited_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(edited_text)
# Expected output: "When I grow up, I will start to understand that what he said is quite right."

Model provider

shanaka95

shanaka95

Model tree

Base

unsloth/gemma-4-E2B-it

Fine-tuned

this model

Modalities

Input

Text, Image

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today