Instructions to use build-small-hackathon/compliment-forest-minicpm5-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use build-small-hackathon/compliment-forest-minicpm5-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="build-small-hackathon/compliment-forest-minicpm5-1b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("build-small-hackathon/compliment-forest-minicpm5-1b") model = AutoModelForCausalLM.from_pretrained("build-small-hackathon/compliment-forest-minicpm5-1b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use build-small-hackathon/compliment-forest-minicpm5-1b 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 build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M # Run inference directly in the terminal: llama cli -hf build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M # Run inference directly in the terminal: llama cli -hf build-small-hackathon/compliment-forest-minicpm5-1b: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 build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
Use Docker
docker model run hf.co/build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use build-small-hackathon/compliment-forest-minicpm5-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "build-small-hackathon/compliment-forest-minicpm5-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "build-small-hackathon/compliment-forest-minicpm5-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
- SGLang
How to use build-small-hackathon/compliment-forest-minicpm5-1b 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 "build-small-hackathon/compliment-forest-minicpm5-1b" \ --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": "build-small-hackathon/compliment-forest-minicpm5-1b", "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 "build-small-hackathon/compliment-forest-minicpm5-1b" \ --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": "build-small-hackathon/compliment-forest-minicpm5-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use build-small-hackathon/compliment-forest-minicpm5-1b with Ollama:
ollama run hf.co/build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
- Unsloth Desktop
- Pi
How to use build-small-hackathon/compliment-forest-minicpm5-1b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf build-small-hackathon/compliment-forest-minicpm5-1b: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": "build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use build-small-hackathon/compliment-forest-minicpm5-1b with Docker Model Runner:
docker model run hf.co/build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
- Lemonade
How to use build-small-hackathon/compliment-forest-minicpm5-1b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
Run and chat with the model
lemonade run user.compliment-forest-minicpm5-1b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use build-small-hackathon/compliment-forest-minicpm5-1b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf build-small-hackathon/compliment-forest-minicpm5-1b: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 build-small-hackathon/compliment-forest-minicpm5-1b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use build-small-hackathon/compliment-forest-minicpm5-1b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf build-small-hackathon/compliment-forest-minicpm5-1b: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 "build-small-hackathon/compliment-forest-minicpm5-1b: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"
docs: add text model card
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253---base_model: openbmb/MiniCPM5-1Blibrary_name: transformerslicense: apache-2.0language:- enpipeline_tag: text-generationtags:- minicpm- openbmb- qlora- llama.cpp- structured-generation- build-small-hackathondatasets:- build-small-hackathon/compliment-forest-sft---
# Compliment Forest MiniCPM5-1B
This is the merged text fine-tune for[The Compliment Forest](https://huggingface.co/spaces/build-small-hackathon/compliment-forest).It turns a name and situation into schema-valid, situation-grounded forest JSON for the app'sauthor pass. The same model also runs a bounded critic pass that prunes generic or redundantclearings.
## Training
- Base: `openbmb/MiniCPM5-1B` (Llama architecture, about 1.08B parameters)- Data: `build-small-hackathon/compliment-forest-sft`- Method: 4-bit NF4 QLoRA on Modal- LoRA: rank 16, alpha 32, dropout 0.05- Targets: attention and MLP projections- Sequence length: 2,048- Epochs: 2- Learning rate: 2e-4 with cosine decay- Runtime thinking mode: disabled for deterministic JSON generation
The dataset was filtered for JSON validity, concrete situation grounding, non-toxic positivity,and short first-person spells. This model is for whimsical encouragement; it is not a therapistor a substitute for professional support.
## Inference
Use the base model's chat template with `enable_thinking=False`. The app enforces the output withPydantic and retries malformed generations at most twice.
The repository also includes a `Q4_K_M` GGUF build for local `llama.cpp` inference.
## License
Apache-2.0, following the base model and project code. Dataset source licenses are documented onthe dataset card.