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 decoder_host.py from Arain119/sophia: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/Arain119/sophia/resolve/7825abf9500ac36bd799579414fbc72ae3ff7dbb/decoder_host.py
- Command line
-
hf download hf://Arain119/sophia@7825abf9500ac36bd799579414fbc72ae3ff7dbb/decoder_host.py
-
curl -L -o decoder_host.py https://huggingface.co/Arain119/sophia/resolve/7825abf9500ac36bd799579414fbc72ae3ff7dbb/decoder_host.py
1.48 kB
| # Generated by ml.integrations.export.runtime_packager.write_remote_code_bundle. | |
| # Exported for HuggingFace trust_remote_code loading. | |
| # This file is intentionally self-contained. | |
| from __future__ import annotations | |
| from typing import Protocol | |
| from .runtime_backend import ( | |
| RuntimeBackend, | |
| ) | |
| class DecoderConfig(Protocol): | |
| def to_model_args( | |
| self, | |
| *, | |
| runtime_max_seq_len: int | None = None, | |
| ) -> object: ... | |
| class DecoderHostMixin: | |
| def _initialize_decoder_runtime( | |
| self, | |
| *, | |
| config: DecoderConfig, | |
| runtime_max_seq_len: int | None, | |
| runtime_backend: RuntimeBackend, | |
| gradient_checkpointing_enabled: bool, | |
| register_tied_weights: bool = False, | |
| ) -> None: | |
| self.model = runtime_backend.transformer_cls( | |
| config.to_model_args(runtime_max_seq_len=runtime_max_seq_len) | |
| ) | |
| self.runtime = self.model.runtime | |
| if bool(register_tied_weights): | |
| self.all_tied_weights_keys = self.get_expanded_tied_weights_keys( | |
| all_submodels=False | |
| ) | |
| # Cache-enabled runtime execution mutates shared KV/index buffers, so a | |
| # single model instance cannot safely run concurrent calls. | |
| self._model_runtime_lock = self.model.runtime_lock | |
| self._sync_runtime_gradient_checkpointing( | |
| enable=bool(gradient_checkpointing_enabled) | |
| ) | |
| __all__ = ["DecoderConfig", "DecoderHostMixin"] | |