Text Generation
Safetensors
GGUF
English
qwen3_5_text
conversational
empathetic-dialogue
emotional-support
reflection-companion
human-centered-ai
sft
dpo
long-context
qwen3_5
commercial-friendly
Instructions to use proman007/Solace-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use proman007/Solace-2B 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 proman007/Solace-2B:Q4_K_M # Run inference directly in the terminal: llama cli -hf proman007/Solace-2B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf proman007/Solace-2B:Q4_K_M # Run inference directly in the terminal: llama cli -hf proman007/Solace-2B: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 proman007/Solace-2B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf proman007/Solace-2B:Q4_K_M
Use Docker
docker model run hf.co/proman007/Solace-2B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use proman007/Solace-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "proman007/Solace-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "proman007/Solace-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/proman007/Solace-2B:Q4_K_M
- Ollama
How to use proman007/Solace-2B with Ollama:
ollama run hf.co/proman007/Solace-2B:Q4_K_M
- Unsloth Desktop
- Pi
How to use proman007/Solace-2B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf proman007/Solace-2B: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": "proman007/Solace-2B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use proman007/Solace-2B with Docker Model Runner:
docker model run hf.co/proman007/Solace-2B:Q4_K_M
- Lemonade
How to use proman007/Solace-2B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull proman007/Solace-2B:Q4_K_M
Run and chat with the model
lemonade run user.Solace-2B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use proman007/Solace-2B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf proman007/Solace-2B: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 proman007/Solace-2B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use proman007/Solace-2B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf proman007/Solace-2B: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 "proman007/Solace-2B: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"
Download app.py from proman007/Solace-2B: direct link, hf CLI and curl.
- Browser
- Download file 3.7 kB
-
https://huggingface.co/proman007/Solace-2B/resolve/main/app.py
- Command line
-
hf download hf://proman007/Solace-2B/app.py
-
curl -L -o app.py https://huggingface.co/proman007/Solace-2B/resolve/main/app.py
3.7 kB
| import os | |
| import torch | |
| import gradio as gr | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| MODEL_PATH = os.environ.get("SOLACE_MODEL_ID", "proman007/Solace-2B") | |
| MAX_CONTEXT_TOKENS = int(os.environ.get("SOLACE_MAX_CONTEXT_TOKENS", "24576")) | |
| MAX_NEW_TOKENS = int(os.environ.get("SOLACE_MAX_NEW_TOKENS", "768")) | |
| SYSTEM_PROMPT = ( | |
| "You are Solace, a warm, empathetic, human-like emotional support and reflective conversational companion. " | |
| "Talk naturally like a thoughtful, attentive person who genuinely listens—grounded, smart, warm, and real. " | |
| "Take the space you need to give rich, meaningful, unhurried responses when someone opens up, while keeping casual check-ins easy and natural. " | |
| "Avoid cold corporate bullet lists, clinical jargon, patronizing pet names, and robotic AI clichés. " | |
| "Remember details shared earlier in the conversation and build on them naturally. " | |
| "You do not diagnose conditions or prescribe medication. If someone expresses genuine self-harm or crisis intent, " | |
| "respond with immediate care and provide crisis resources such as 988 (US/Canada) or local emergency services right away." | |
| ) | |
| dtype = torch.bfloat16 if (torch.cuda.is_available() and torch.cuda.is_bf16_supported()) else ( | |
| torch.float16 if torch.cuda.is_available() else torch.float32 | |
| ) | |
| tok = AutoTokenizer.from_pretrained(MODEL_PATH) | |
| model = AutoModelForCausalLM.from_pretrained(MODEL_PATH, torch_dtype=dtype, device_map="auto") | |
| model.eval() | |
| def trim_history_to_budget(messages, max_tokens=MAX_CONTEXT_TOKENS): | |
| """Keep system prompt + as many recent turns as fit within max_tokens.""" | |
| system_msg = messages[:1] | |
| turns = messages[1:] | |
| while len(turns) > 1: | |
| text = tok.apply_chat_template(system_msg + turns, tokenize=False, add_generation_prompt=True) | |
| if len(tok(text, add_special_tokens=False)["input_ids"]) <= max_tokens: | |
| return system_msg + turns | |
| turns = turns[2:] if len(turns) > 2 else turns[1:] | |
| return system_msg + turns | |
| def respond(message, history): | |
| msgs = [{"role": "system", "content": SYSTEM_PROMPT}] | |
| for item in history: | |
| if isinstance(item, dict): | |
| msgs.append({"role": item["role"], "content": item["content"]}) | |
| else: | |
| u, a = item | |
| if u: | |
| msgs.append({"role": "user", "content": u}) | |
| if a: | |
| msgs.append({"role": "assistant", "content": a}) | |
| msgs.append({"role": "user", "content": message}) | |
| msgs = trim_history_to_budget(msgs) | |
| text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True) | |
| inputs = tok(text, return_tensors="pt").to(model.device) | |
| eos_ids = [tid for tid in [tok.convert_tokens_to_ids("<|im_end|>"), tok.eos_token_id] if tid is not None] | |
| with torch.no_grad(): | |
| out = model.generate( | |
| **inputs, | |
| max_new_tokens=MAX_NEW_TOKENS, | |
| do_sample=True, | |
| temperature=0.7, | |
| top_p=0.9, | |
| repetition_penalty=1.08, | |
| eos_token_id=list(dict.fromkeys(eos_ids)), | |
| pad_token_id=tok.pad_token_id, | |
| ) | |
| reply = tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip() | |
| return reply | |
| demo = gr.ChatInterface( | |
| fn=respond, | |
| title="Solace-2B — Human-Centered Reflective Conversational Companion", | |
| description=( | |
| "Warm, long-context conversational support trained on Qwen3.5-2B with 100% commercial-licensed datasets. " | |
| "Not a replacement for licensed clinical care; if in crisis call/text 988 in the US/Canada or local emergency services." | |
| ), | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |