How to use from
llama.cpp
Install from brew
brew install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf redromnon/LFM2-700M-grammar-correction:
# Run inference directly in the terminal:
llama-cli -hf redromnon/LFM2-700M-grammar-correction:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf redromnon/LFM2-700M-grammar-correction:
# Run inference directly in the terminal:
llama-cli -hf redromnon/LFM2-700M-grammar-correction:
Use pre-built binary
# 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:
# Run inference directly in the terminal:
./llama-cli -hf redromnon/LFM2-700M-grammar-correction:
Build from source code
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:
# Run inference directly in the terminal:
./build/bin/llama-cli -hf redromnon/LFM2-700M-grammar-correction:
Use Docker
docker model run hf.co/redromnon/LFM2-700M-grammar-correction:
Quick Links

LFM2-700M-grammar-correction : GGUF

How to use:

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:

  • For text only LLMs: ./llama.cpp/llama-cli -hf redromnon/LFM2-700M-grammar-correction --jinja
  • For multimodal models: ./llama.cpp/llama-mtmd-cli -hf redromnon/LFM2-700M-grammar-correction --jinja

Available Model files:

  • LFM2-700M.Q5_K_M.gguf
  • LFM2-700M.Q8_0.gguf
  • LFM2-700M.Q4_K_M.gguf

Note

The model's BOS token behavior was adjusted for GGUF compatibility. This was trained 2x faster with Unsloth

Downloads last month
72
GGUF
Model size
0.7B params
Architecture
lfm2
Hardware compatibility
Log In to add your hardware

4-bit

5-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for redromnon/LFM2-700M-grammar-correction

Quantized
(21)
this model

Dataset used to train redromnon/LFM2-700M-grammar-correction