Instructions to use soichi1208/Soichi-gemma4-31B-FT 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 soichi1208/Soichi-gemma4-31B-FT 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 soichi1208/Soichi-gemma4-31B-FT:Q2_K # Run inference directly in the terminal: llama cli -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K # Run inference directly in the terminal: llama cli -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
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 soichi1208/Soichi-gemma4-31B-FT:Q2_K # Run inference directly in the terminal: ./llama-cli -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
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 soichi1208/Soichi-gemma4-31B-FT:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
Use Docker
docker model run hf.co/soichi1208/Soichi-gemma4-31B-FT:Q2_K
- LM Studio
- Jan
- Ollama
How to use soichi1208/Soichi-gemma4-31B-FT with Ollama:
ollama run hf.co/soichi1208/Soichi-gemma4-31B-FT:Q2_K
- Unsloth Studio
How to use soichi1208/Soichi-gemma4-31B-FT 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 soichi1208/Soichi-gemma4-31B-FT 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 soichi1208/Soichi-gemma4-31B-FT to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for soichi1208/Soichi-gemma4-31B-FT to start chatting
- Pi
How to use soichi1208/Soichi-gemma4-31B-FT with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "soichi1208/Soichi-gemma4-31B-FT:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use soichi1208/Soichi-gemma4-31B-FT with Docker Model Runner:
docker model run hf.co/soichi1208/Soichi-gemma4-31B-FT:Q2_K
- Lemonade
How to use soichi1208/Soichi-gemma4-31B-FT with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull soichi1208/Soichi-gemma4-31B-FT:Q2_K
Run and chat with the model
lemonade run user.Soichi-gemma4-31B-FT-Q2_K
List all available models
lemonade list
- Hermes Agent
How to use soichi1208/Soichi-gemma4-31B-FT with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
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:8080/v1 hermes config set model.default soichi1208/Soichi-gemma4-31B-FT:Q2_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use soichi1208/Soichi-gemma4-31B-FT with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K
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:8080/v1 \ --custom-model-id "soichi1208/Soichi-gemma4-31B-FT:Q2_K" \ --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"
How to use from
OpenClawConfigure 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:8080/v1 \
--custom-model-id "soichi1208/Soichi-gemma4-31B-FT:Q2_K" \
--custom-provider-id llama-cpp \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-healthRun OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"Quick Links
Soichi-gemma4-31B-FT
unsloth/gemma-4-31B-it-unsloth-bnb-4bitを僕のツイートデータ約1万件ちょっとを用いてQLoRAにてSFTしたものです。関わってるユーザー名は一樹くん(@L_port8000など)、あきのはらそうや(@soyaakinohara3など)以外は伏せています。 また、会話形式にする上での補完はQwen3.5-9Bを使用しています。
概要
- ベースモデル: unsloth/gemma-4-31B-it-unsloth-bnb-4bit
- 手法: QLoRA (rank=16, alpha=16, target: q/k/v/o/gate/up/down_proj) ローカルのRTX 3090で。
- 学習データ: 個人の Twitter (X) 投稿約 12,000 件(会話ペア形式に変換)
- 目的: 特定人物の語調・文体・意見傾向を模倣するキャラクター LoRA
使い方
llama-cppとかでggufを使うか直接ロードするかしてください。
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
"soichi1208/Soichi-gemma4-31B-FT",
load_in_4bit=True,
max_seq_length=512,
)
FastModel.for_inference(model)
prompt=input("このSoichiに、何をお聞きかね?:")
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=100,
do_sample=True,
temperature=0.9,
repetition_penalty=1.2,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
謝辞
- Unsloth (https://github.com/unslothai/unsloth) — 高速ファインチューニング
- TRL (https://github.com/huggingface/trl) — SFTTrainer
- Google — Gemma 4 ベースモデル
- Qwen3.5-9B-gguf(https://huggingface.co/unsloth/Qwen3.5-9B-GGUF)
- Downloads last month
- 15
Hardware compatibility
Log In to add your hardware
2-bit
4-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for soichi1208/Soichi-gemma4-31B-FT
Base model
google/gemma-4-31B Finetuned
google/gemma-4-31B-it Quantized
unsloth/gemma-4-31B-it-unsloth-bnb-4bit
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp# Start a local OpenAI-compatible server: llama serve -hf soichi1208/Soichi-gemma4-31B-FT:Q2_K