agentlans/grammar-correction
Viewer • Updated • 125k • 271 • 10
How to use redromnon/LFM2-700M-grammar-correction with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M # Run inference directly in the terminal: llama cli -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M # Run inference directly in the terminal: llama cli -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf redromnon/LFM2-700M-grammar-correction:Q4_K_M
docker model run hf.co/redromnon/LFM2-700M-grammar-correction:Q4_K_M
How to use redromnon/LFM2-700M-grammar-correction with Ollama:
ollama run hf.co/redromnon/LFM2-700M-grammar-correction:Q4_K_M
How to use redromnon/LFM2-700M-grammar-correction with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for redromnon/LFM2-700M-grammar-correction to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for redromnon/LFM2-700M-grammar-correction to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for redromnon/LFM2-700M-grammar-correction to start chatting
How to use redromnon/LFM2-700M-grammar-correction with Docker Model Runner:
docker model run hf.co/redromnon/LFM2-700M-grammar-correction:Q4_K_M
How to use redromnon/LFM2-700M-grammar-correction with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull redromnon/LFM2-700M-grammar-correction:Q4_K_M
lemonade run user.LFM2-700M-grammar-correction-Q4_K_M
lemonade list
This model is fine-tuned on a grammar-correction dataset. Use the following prefix before the text you would like to correct as the user query:
Fix grammar only. Return the corrected sentence only: {text}
Also adjust the following parameters:
temperature = 0.3
min_p = 0.15
repetition_penalty = 1.05
This model was finetuned and converted to GGUF format using Unsloth.
Example usage with llama.cpp:
./llama.cpp/llama-cli -hf redromnon/LFM2-700M-grammar-correction --jinja./llama.cpp/llama-mtmd-cli -hf redromnon/LFM2-700M-grammar-correction --jinjaLFM2-700M.Q5_K_M.ggufLFM2-700M.Q8_0.ggufLFM2-700M.Q4_K_M.ggufThe model's BOS token behavior was adjusted for GGUF compatibility.
This was trained 2x faster with Unsloth

4-bit
5-bit
8-bit
Base model
LiquidAI/LFM2-700M