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 chat.py from proman007/Solace-2B: direct link, hf CLI and curl.
- Browser
- Download file 3.49 kB
-
https://huggingface.co/proman007/Solace-2B/resolve/main/chat.py
- Command line
-
hf download hf://proman007/Solace-2B/chat.py
-
curl -L -o chat.py https://huggingface.co/proman007/Solace-2B/resolve/main/chat.py
3.49 kB
| import os | |
| import torch | |
| 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." | |
| ) | |
| def trim_history_to_budget(tok, messages, max_tokens=MAX_CONTEXT_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 main(): | |
| 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() | |
| eos_ids = list(dict.fromkeys( | |
| [tid for tid in [tok.convert_tokens_to_ids("<|im_end|>"), tok.eos_token_id] if tid is not None] | |
| )) | |
| history = [] | |
| print(f"Solace-2B ready (context budget: {MAX_CONTEXT_TOKENS} tokens). Type 'exit' to quit, 'reset' to clear.\n") | |
| while True: | |
| user = input("You: ").strip() | |
| if not user: | |
| continue | |
| if user.lower() in {"exit", "quit"}: | |
| break | |
| if user.lower() == "reset": | |
| history.clear() | |
| print("[Conversation memory cleared]\n") | |
| continue | |
| msgs = trim_history_to_budget(tok, [{"role": "system", "content": SYSTEM_PROMPT}] + history + [{"role": "user", "content": user}]) | |
| text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True) | |
| inputs = tok(text, return_tensors="pt").to(model.device) | |
| 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=eos_ids, | |
| pad_token_id=tok.pad_token_id, | |
| ) | |
| reply = tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip() | |
| print(f"Solace: {reply}\n") | |
| history.extend([{"role": "user", "content": user}, {"role": "assistant", "content": reply}]) | |
| if __name__ == "__main__": | |
| main() | |