Instructions to use Arain119/sophia 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 Arain119/sophia 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 Arain119/sophia:Q4_K_M # Run inference directly in the terminal: llama cli -hf Arain119/sophia:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Arain119/sophia:Q4_K_M # Run inference directly in the terminal: llama cli -hf Arain119/sophia:Q4_K_M
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 Arain119/sophia:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Arain119/sophia:Q4_K_M
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 Arain119/sophia:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Arain119/sophia:Q4_K_M
Use Docker
docker model run hf.co/Arain119/sophia:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Arain119/sophia with Ollama:
ollama run hf.co/Arain119/sophia:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Arain119/sophia with Docker Model Runner:
docker model run hf.co/Arain119/sophia:Q4_K_M
- Lemonade
How to use Arain119/sophia with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Arain119/sophia:Q4_K_M
Run and chat with the model
lemonade run user.sophia-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Arain119
Sophia 1.0.0 — 1B K3-hybrid Chinese chat model (HF remote-code export + native package)
d53adc9 Download chat_template.jinja from Arain119/sophia: direct link, hf CLI and curl.
- Browser
- Download file 2.58 kB
-
https://huggingface.co/Arain119/sophia/resolve/main/chat_template.jinja
- Command line
-
hf download hf://Arain119/sophia/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/Arain119/sophia/resolve/main/chat_template.jinja
2.58 kB
| {%- macro render_response_format(schema) -%} | |
| {{- '## Response Format:\n\nYou MUST strictly adhere to the following schema to reply:\n' + (schema | tojson) -}} | |
| {%- endmacro -%} | |
| {%- set bos = '<|begin▁of▁sentence|>' -%} | |
| {%- set eos = '<|end▁of▁sentence|>' -%} | |
| {%- set user = '<|User|>' -%} | |
| {%- set assistant = '<|Assistant|>' -%} | |
| {%- set latest_reminder = '<|latest_reminder|>' -%} | |
| {{- bos -}} | |
| {%- for message in messages -%} | |
| {%- set role = message.role -%} | |
| {%- set prev_role = messages[loop.index0 - 1].role if loop.index0 > 0 else none -%} | |
| {%- set next_role = messages[loop.index0 + 1].role if not loop.last else none -%} | |
| {%- set need_transition = loop.last or next_role == 'assistant' or next_role == 'latest_reminder' -%} | |
| {%- if role == 'system' or role == 'developer' -%} | |
| {%- if role == 'developer' -%}{{- user -}}{%- endif -%} | |
| {{- message.content or '' -}} | |
| {%- if message.response_format is defined and message.response_format -%} | |
| {{ '\n\n' }}{{- render_response_format(message.response_format) -}} | |
| {%- endif -%} | |
| {%- elif role == 'user' -%} | |
| {%- set continuation_user = prev_role == 'user' -%} | |
| {%- if continuation_user -%} | |
| {{- '\n\n' -}} | |
| {%- else -%} | |
| {{- user -}} | |
| {%- endif -%} | |
| {%- if message.content_blocks is defined and message.content_blocks is iterable and message.content_blocks is not string and message.content_blocks|length > 0 -%} | |
| {%- for block in message.content_blocks -%} | |
| {%- if not loop.first -%}{{- '\n\n' -}}{%- endif -%} | |
| {%- if block.type == 'text' -%} | |
| {{- block.text or '' -}} | |
| {%- else -%} | |
| {{- '[Unsupported ' ~ (block.type or 'unknown') ~ ']' -}} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- else -%} | |
| {{- message.content or '' -}} | |
| {%- endif -%} | |
| {%- elif role == 'latest_reminder' -%} | |
| {{- latest_reminder + (message.content or '') -}} | |
| {%- elif role == 'assistant' -%} | |
| {% generation %} | |
| {{- message.content or '' -}} | |
| {%- if not (message.wo_eos is defined and message.wo_eos) -%} | |
| {{- eos -}} | |
| {%- endif -%} | |
| {% endgeneration %} | |
| {%- endif -%} | |
| {%- if need_transition -%} | |
| {%- if role == 'user' or role == 'developer' -%} | |
| {%- if not (loop.last and not add_generation_prompt) -%} | |
| {{- assistant -}} | |
| {%- endif -%} | |
| {%- endif -%} | |
| {%- endif -%} | |
| {%- endfor -%} | |