Instructions to use cjvt/gemma-3-27b-it-dassle-gec with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cjvt/gemma-3-27b-it-dassle-gec with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-3-27b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "cjvt/gemma-3-27b-it-dassle-gec") - Transformers
How to use cjvt/gemma-3-27b-it-dassle-gec with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cjvt/gemma-3-27b-it-dassle-gec") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cjvt/gemma-3-27b-it-dassle-gec", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cjvt/gemma-3-27b-it-dassle-gec with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cjvt/gemma-3-27b-it-dassle-gec" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cjvt/gemma-3-27b-it-dassle-gec", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cjvt/gemma-3-27b-it-dassle-gec
- SGLang
How to use cjvt/gemma-3-27b-it-dassle-gec 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 "cjvt/gemma-3-27b-it-dassle-gec" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cjvt/gemma-3-27b-it-dassle-gec", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "cjvt/gemma-3-27b-it-dassle-gec" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cjvt/gemma-3-27b-it-dassle-gec", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use cjvt/gemma-3-27b-it-dassle-gec with Docker Model Runner:
docker model run hf.co/cjvt/gemma-3-27b-it-dassle-gec
Model Card for gemma-3-27b-it-dassle-gec
“gemma-3-27b-it-dassle-gec” is an instruction-tuned 27B Gemma 3 model fine-tuned using LoRA & unsloth library for general grammatical error correction using the DASSLE 1.0 dataset (Dataset of Authentic and Synthetic Slovene Language Errors). The dataset was split into training/validation/test sets using stratified sampling, with 80% of each coarse error category (e.g., Orthography/Zapis) assigned to the training set, 10% to the validation, and 10% to the test set. The best model was selected based on the validation loss.
On the test set the model achieves exact match score = 0.462.
Note that this is a very strict metric, and overall the model performs decently, although certain errors are still beyond its learned knowledge
(likely due to the relatively small dataset containing isolated error types).
The model was trained in the conversational scenario, where the user inputs a text, and the assistant returns the corrected text. Given a user input“To besedilo usebuje slovnično napako.” (and the system prompt "Si slovenski slovnični popravljalnik. Za uporabniško besedilo v slovenščini zgeneriraj slovnično pravilno verzijo besedila. Ne parafraziraj vhoda po nepotrebnem.")
the assistant should generate the corrected text“To besedilo vsebuje slovnično napako.”
Acknowledgment
The work was primarily supported by the Slovene Research and Innovation Agency (ARIS) project GC-0002 and the core research programme P6-0411.
The work was also supported by EU through ERA Chair grant no. 101186647 (AI4DH), EC/EuroHPC JU and the Slovenian Ministry of HESI via the project SLAIF (grant number 101254461).
- Downloads last month
- 7
Model tree for cjvt/gemma-3-27b-it-dassle-gec
Base model
google/gemma-3-27b-pt