Text Generation
Transformers
Safetensors
gemma3_text
Generated from Trainer
text-generation-inference
Run this model with HF Jobs
Run huyisme-005/grammar_error_corrector on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/huyisme-005/grammar_error_corrector. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/huyisme-005/grammar_error_corrector on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/huyisme-005/grammar_error_corrector. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/huyisme-005/grammar_error_corrector. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use huyisme-005/grammar_error_corrector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huyisme-005/grammar_error_corrector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huyisme-005/grammar_error_corrector")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huyisme-005/grammar_error_corrector") model = AutoModelForCausalLM.from_pretrained("huyisme-005/grammar_error_corrector", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huyisme-005/grammar_error_corrector with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huyisme-005/grammar_error_corrector" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huyisme-005/grammar_error_corrector", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huyisme-005/grammar_error_corrector
- SGLang
How to use huyisme-005/grammar_error_corrector with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "huyisme-005/grammar_error_corrector" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huyisme-005/grammar_error_corrector", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "huyisme-005/grammar_error_corrector" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huyisme-005/grammar_error_corrector", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huyisme-005/grammar_error_corrector with Docker Model Runner:
docker model run hf.co/huyisme-005/grammar_error_corrector
Upload folder using huggingface_hub
Browse filesFiles changed (12)
- .gitattributes+1
- README.mdAdded+61
- added_tokens.jsonAdded+3
- config.jsonAdded+54
- generation_config.jsonAdded+11
- model.safetensorsAdded+3
- noisy_zarma_metrics.jsonAdded+68
- special_tokens_map.jsonAdded+33
- tokenizer.jsonAdded+3
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded
- training_args.binAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061---library_name: transformerslicense: gemmabase_model: google/gemma-3-270mtags:- generated_from_trainermodel-index:- name: gemma_noisy_zarma_finetune results: []---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# gemma_noisy_zarma_finetune
This model is a fine-tuned version of [google/gemma-3-270m](https://huggingface.co/google/gemma-3-270m) on the None dataset.It achieves the following results on the evaluation set:- Loss: 2.0806
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 2e-05- train_batch_size: 28- eval_batch_size: 28- seed: 42- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: linear- num_epochs: 3- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:-----:|:---------------:|| 1.2439 | 1.0 | 9643 | 1.6537 || 0.9003 | 2.0 | 19286 | 1.8666 || 0.696 | 3.0 | 28929 | 2.0806 |
### Framework versions
- Transformers 4.57.0- Pytorch 2.8.0+cu128- Datasets 4.1.1- Tokenizers 0.22.1123{ "<image_soft_token>": 262144}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354{ "_sliding_window_pattern": 6, "architectures": [ "Gemma3ForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "attn_logit_softcapping": null, "bos_token_id": 2, "dtype": "float32", "eos_token_id": 1, "final_logit_softcapping": null, "head_dim": 256, "hidden_activation": "gelu_pytorch_tanh", "hidden_size": 640, "initializer_range": 0.02, "intermediate_size": 2048, "layer_types": [ "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention" ], "max_position_embeddings": 32768, "model_type": "gemma3_text", "num_attention_heads": 4, "num_hidden_layers": 18, "num_key_value_heads": 1, "pad_token_id": 0, "query_pre_attn_scalar": 256, "rms_norm_eps": 1e-06, "rope_local_base_freq": 10000.0, "rope_scaling": null, "rope_theta": 1000000.0, "sliding_window": 512, "transformers_version": "4.57.0", "use_bidirectional_attention": false, "use_cache": true, "vocab_size": 262144}1234567891011{ "bos_token_id": 2, "do_sample": true, "eos_token_id": [ 1 ], "pad_token_id": 0, "top_k": 64, "top_p": 0.95, "transformers_version": "4.57.0"}123version https://git-lfs.github.com/spec/v1oid sha256:021eaa4dfac2a735365503d2f78e6fd7cbd5da92f64eaac7a5170e70bcbc13bdsize 10724192561234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768{ "model": "google/gemma-3-270m", "train_rows": 45000, "eval_rows": 5000, "epochs": 3, "learning_rate": 2e-05, "final_eval_loss": 2.080573, "final_perplexity": 8.009057, "noisy_columns": [ "char_swap", "random_char_insertion", "char_delete", "char_substitute", "word_masking", "word_swap" ], "overall": { "BLEU": 46.8891, "ChrF++": 51.4311, "COMET": null, "n_samples": 30000, "COMET_error": "COMET scoring unavailable or failed." }, "per_column": { "char_swap": { "BLEU": 50.1065, "ChrF++": 54.3406, "COMET": null, "n_samples": 5000, "COMET_error": "COMET scoring unavailable or failed." }, "random_char_insertion": { "BLEU": 49.0539, "ChrF++": 53.9819, "COMET": null, "n_samples": 5000, "COMET_error": "COMET scoring unavailable or failed." }, "char_delete": { "BLEU": 46.5467, "ChrF++": 52.1023, "COMET": null, "n_samples": 5000, "COMET_error": "COMET scoring unavailable or failed." }, "char_substitute": { "BLEU": 48.4838, "ChrF++": 52.7162, "COMET": null, "n_samples": 5000, "COMET_error": "COMET scoring unavailable or failed." }, "word_masking": { "BLEU": 40.6802, "ChrF++": 43.6655, "COMET": null, "n_samples": 5000, "COMET_error": "COMET scoring unavailable or failed." }, "word_swap": { "BLEU": 44.524, "ChrF++": 51.7803, "COMET": null, "n_samples": 5000, "COMET_error": "COMET scoring unavailable or failed." } }}123456789101112131415161718192021222324252627282930313233{ "boi_token": "<start_of_image>", "bos_token": { "content": "<bos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eoi_token": "<end_of_image>", "eos_token": { "content": "<eos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "image_token": "<image_soft_token>", "pad_token": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:81dff017751f3628fd40ceb598dea6e37bce914e3ba98843f65dac72abe71edasize 33384819123version https://git-lfs.github.com/spec/v1oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79csize 4689074123version https://git-lfs.github.com/spec/v1oid sha256:0ea4231a12ad03603309e5bb0916d2e7e0e78cdf05a8370e1fd302f34177b107size 5841.gitattributes+1
README.mdAdded+61
added_tokens.jsonAdded+3
config.jsonAdded+54
generation_config.jsonAdded+11
model.safetensorsAdded+3
noisy_zarma_metrics.jsonAdded+68
special_tokens_map.jsonAdded+33
tokenizer.jsonAdded+3
tokenizer.modelAdded+3
tokenizer_config.jsonAdded
training_args.binAdded+3