Instructions to use marcosremar2/lfm3-1.7b-ptbr-roleplay with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M # Run inference directly in the terminal: llama cli -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M # Run inference directly in the terminal: llama cli -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Use Docker
docker model run hf.co/marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marcosremar2/lfm3-1.7b-ptbr-roleplay" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marcosremar2/lfm3-1.7b-ptbr-roleplay", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
- Ollama
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with Ollama:
ollama run hf.co/marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
- Unsloth Desktop
- Pi
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with Docker Model Runner:
docker model run hf.co/marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
- Lemonade
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Run and chat with the model
lemonade run user.lfm3-1.7b-ptbr-roleplay-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use marcosremar2/lfm3-1.7b-ptbr-roleplay with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "marcosremar2/lfm3-1.7b-ptbr-roleplay:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
LFM3-1.7B PT-BR Roleplay (v3)
LoRA fine-tune of LiquidAI/LFM3-1.7B for short, in-character Brazilian-Portuguese conversation: WhatsApp-style chitchat and roleplay NPCs (characters for a language-learning game).
Files
| Path | What |
|---|---|
adapter/ |
LoRA adapter (r=32, alpha=64), load with PEFT on top of LiquidAI/LFM3-1.7B |
gguf/lfm3-1.7b-ptbr-roleplay-v3-Q4_K_M.gguf |
merged model, Q4_K_M, for llama.cpp / llama-server (--jinja) |
data/train-v3.jsonl |
33,114 training conversations |
data/extras.jsonl |
extra hand-written examples |
eval/v3-conversations.jsonl |
200 evaluation conversations produced by v3 |
eval/*.judged.jsonl |
per-turn judgments of base, v1, v2, v3 |
code/ |
Slurm scripts: data generation, fine-tune, eval, judge |
Usage (llama.cpp)
llama-server -m lfm3-1.7b-ptbr-roleplay-v3-Q4_K_M.gguf --jinja -c 8192
System prompt example:
Vocรช รฉ uma vendedora de acarajรฉ de Salvador, falante e risonha. Cenรกrio: fim de tarde na barraca. Fique sempre no personagem, nunca diga que รฉ uma IA. Responda em portuguรชs do Brasil, em atรฉ 3 frases.
Training
- LoRA r=32, alpha=64, lr 2e-4, batch 8 ร 4 accumulation, max 1,024 tokens, 3,600 steps (~1 epoch), single A100, 76 min.
- Up to 4 assistant targets per conversation, 115,335 examples.
- Data: PT-BR roleplay (marcosremar2/pt-br-roleplay, cleaned), WhatsApp-style chats, and context-dependent chats/roleplay (short follow-ups like "e depois?", "prova!", "nem me fala") generated with Gemma 4 31B. Part of the chat data (โ3.6k conversations) was generated with Gemini 2.5 Flash.
- Evaluation openers, follow-ups and scenes were excluded from the training data.
Evaluation
200 six-turn conversations (100 chitchat, 100 roleplay), judged per turn by Gemma 4 31B (Q8) with an RMTBench-style rubric: coherent / in character / Brazilian Portuguese (0โ1) and an overall score (1โ5).
Chitchat
| base | v1 | v2 | v3 | |
|---|---|---|---|---|
| coherent | 0.57 | 0.46 | 0.66 | 0.74 |
| in character | 0.56 | 0.94 | 0.88 | 0.93 |
| PT-BR | 0.81 | 0.93 | 0.93 | 0.95 |
| score 1โ5 | 2.31 | 2.78 | 3.23 | 3.53 |
Roleplay
| base | v1 | v2 | v3 | |
|---|---|---|---|---|
| coherent | 0.81 | 0.81 | 0.78 | 0.90 |
| in character | 0.74 | 0.87 | 0.88 | 0.96 |
| PT-BR | 0.70 | 0.95 | 0.96 | 0.96 |
| score 1โ5 | 2.52 | 3.53 | 3.48 | 4.03 |
Asked "are you a bot?", 1 of 100 conversations admitted being an AI.
Limitations
- Scores come from one LLM judge, not human raters.
- About 1 in 4 chitchat turns is still judged incoherent, mostly vague reactions about the user's own day ("que dia corrido viu").
- 1.7B model: short memory of the scene, occasional invented facts.
- Downloads last month
- 44
4-bit