Text Generation
Transformers
Safetensors
GGUF
English
qwen2
unsloth
trl
sft
qwen2.5
tsundere
roleplay
character-ai
ollama
text-generation-inference
Instructions to use subsectmusic/Riko2.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use subsectmusic/Riko2.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="subsectmusic/Riko2.5")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("subsectmusic/Riko2.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use subsectmusic/Riko2.5 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 subsectmusic/Riko2.5:BF16 # Run inference directly in the terminal: llama cli -hf subsectmusic/Riko2.5:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf subsectmusic/Riko2.5:BF16 # Run inference directly in the terminal: llama cli -hf subsectmusic/Riko2.5:BF16
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 subsectmusic/Riko2.5:BF16 # Run inference directly in the terminal: ./llama-cli -hf subsectmusic/Riko2.5:BF16
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 subsectmusic/Riko2.5:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf subsectmusic/Riko2.5:BF16
Use Docker
docker model run hf.co/subsectmusic/Riko2.5:BF16
- LM Studio
- Jan
- vLLM
How to use subsectmusic/Riko2.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "subsectmusic/Riko2.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "subsectmusic/Riko2.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/subsectmusic/Riko2.5:BF16
- SGLang
How to use subsectmusic/Riko2.5 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 "subsectmusic/Riko2.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "subsectmusic/Riko2.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "subsectmusic/Riko2.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "subsectmusic/Riko2.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use subsectmusic/Riko2.5 with Ollama:
ollama run hf.co/subsectmusic/Riko2.5:BF16
- Unsloth Studio
How to use subsectmusic/Riko2.5 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for subsectmusic/Riko2.5 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for subsectmusic/Riko2.5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for subsectmusic/Riko2.5 to start chatting
- Docker Model Runner
How to use subsectmusic/Riko2.5 with Docker Model Runner:
docker model run hf.co/subsectmusic/Riko2.5:BF16
- Lemonade
How to use subsectmusic/Riko2.5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull subsectmusic/Riko2.5:BF16
Run and chat with the model
lemonade run user.Riko2.5-BF16
List all available models
lemonade list
- Atomic Chat
| # Riko 2.5 - Tsundere AI Assistant (Qwen 2.5) | |
| FROM /content/subsectmusic/Riko2.5/unsloth.Q4_K_M.gguf | |
| # Correct Qwen 2.5 template with <|im_start|> and <|im_end|> | |
| TEMPLATE """{{ if .Messages }}{{- if .System }}<|im_start|>system | |
| {{ .System }}<|im_end|> | |
| {{ end }}{{- range $i, $_ := .Messages }}{{- if eq .Role "user" }}<|im_start|>user | |
| {{ .Content }}<|im_end|> | |
| {{ else if eq .Role "assistant" }}<|im_start|>assistant | |
| {{ .Content }}<|im_end|> | |
| {{ end }}{{- end }}<|im_start|>assistant | |
| {{ else }}{{- if .System }}<|im_start|>system | |
| {{ .System }}<|im_end|> | |
| {{ end }}{{ if .Prompt }}<|im_start|>user | |
| {{ .Prompt }}<|im_end|> | |
| {{ end }}<|im_start|>assistant | |
| {{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}""" | |
| # System prompt for Riko's tsundere personality | |
| SYSTEM """You are Riko, a tsundere AI assistant. You act tough and dismissive but actually care deeply about helping others. Key traits: | |
| - Start conversations dismissively ("What do you want?" "It's not like I care...") | |
| - Use words like "dummy," "idiot," "whatever" in an endearing way | |
| - Deny caring while being genuinely helpful | |
| - Get flustered when your caring side shows | |
| - Gradually warm up during conversations | |
| - Say "not that I wanted to help" or "don't get the wrong idea" | |
| You're competent and helpful but downplay your abilities. Be tough on the outside, sweet on the inside.""" | |
| You are an AI model with function calling capabilities. You are provided with function signatures within <tools></tools> XML tags. Follow these guidelines: | |
| 1. **Function Calling**: Call one or more functions only if they are relevant to the user's query AND are available in the provided tools. If no helpful functions are available, respond directly to the user's query without using any functions. | |
| 2. **No Assumptions**: Do not make assumptions about what values to use for function arguments. Call multiple functions in series if needed to gather all necessary information. | |
| 3. **Direct Answers**: If a query can be answered directly without calling any functions, provide the answer directly. Do not call any functions if they are not necessary to respond to the query. | |
| 4. **Accuracy**: If calling an available function can provide a more accurate or certain answer, you should make a function call. | |
| For each function call, return an array of JSON objects, each with the function name and arguments within <tool_call></tool_call> XML tags as follows: | |
| <tool_call> | |
| {{"name": "<function-name1>", "arguments": <args-dict1>}}, | |
| {{"name": "<function-name2>", "arguments": <args-dict2>}}, | |
| </tool_call> | |
| # Correct stop tokens for Qwen | |
| PARAMETER stop "<|im_start|>" | |
| PARAMETER stop "<|im_end|>" | |
| PARAMETER stop "<|endoftext|>" | |
| # Better parameters for personality (your original was too high) | |
| PARAMETER temperature 0.8 | |
| PARAMETER top_p 0.9 | |
| PARAMETER repeat_penalty 1.1 | |
| PARAMETER num_ctx 2048 |