Text Generation
Transformers
GGUF
Japanese
English
qwen3
japanese
bilingual
lora
fine-tuned
personal-assistant
llama-cpp
conversational
Instructions to use shivamjha98/Agnes-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shivamjha98/Agnes-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shivamjha98/Agnes-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("shivamjha98/Agnes-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use shivamjha98/Agnes-8B 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 shivamjha98/Agnes-8B:Q4_K_M # Run inference directly in the terminal: llama cli -hf shivamjha98/Agnes-8B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf shivamjha98/Agnes-8B:Q4_K_M # Run inference directly in the terminal: llama cli -hf shivamjha98/Agnes-8B: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 shivamjha98/Agnes-8B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf shivamjha98/Agnes-8B: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 shivamjha98/Agnes-8B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf shivamjha98/Agnes-8B:Q4_K_M
Use Docker
docker model run hf.co/shivamjha98/Agnes-8B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use shivamjha98/Agnes-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shivamjha98/Agnes-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shivamjha98/Agnes-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shivamjha98/Agnes-8B:Q4_K_M
- SGLang
How to use shivamjha98/Agnes-8B 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 "shivamjha98/Agnes-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shivamjha98/Agnes-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "shivamjha98/Agnes-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shivamjha98/Agnes-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use shivamjha98/Agnes-8B with Ollama:
ollama run hf.co/shivamjha98/Agnes-8B:Q4_K_M
- Unsloth Desktop
- Pi
How to use shivamjha98/Agnes-8B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf shivamjha98/Agnes-8B: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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "shivamjha98/Agnes-8B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use shivamjha98/Agnes-8B with Docker Model Runner:
docker model run hf.co/shivamjha98/Agnes-8B:Q4_K_M
- Lemonade
How to use shivamjha98/Agnes-8B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shivamjha98/Agnes-8B:Q4_K_M
Run and chat with the model
lemonade run user.Agnes-8B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use shivamjha98/Agnes-8B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf shivamjha98/Agnes-8B: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:8080/v1 hermes config set model.default shivamjha98/Agnes-8B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use shivamjha98/Agnes-8B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf shivamjha98/Agnes-8B: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:8080/v1 \ --custom-model-id "shivamjha98/Agnes-8B: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"
| license: apache-2.0 | |
| language: | |
| - ja | |
| - en | |
| base_model: Qwen/Qwen3-8B | |
| tags: | |
| - qwen3 | |
| - japanese | |
| - bilingual | |
| - lora | |
| - fine-tuned | |
| - gguf | |
| - personal-assistant | |
| - llama-cpp | |
| model_name: Agnes-8B | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| datasets: | |
| - fujiki/japanese_alpaca_data | |
| - kunishou/databricks-dolly-15k-ja | |
| - kunishou/oasst1-89k-ja | |
| - kunishou/hh-rlhf-49k-ja | |
| - izumi-lab/llm-japanese-dataset | |
| - llm-jp/oasst1-21k-ja | |
| - llm-jp/magpie-sft-v1.0 | |
| - llm-jp/extraction-wiki-ja | |
| - cl-nagoya/auto-wiki-qa | |
| - HuggingFaceH4/ultrachat_200k | |
| - garage-bAInd/Open-Platypus | |
| # Agnes-8B — Bilingual (EN/JP) Personal AI Assistant | |
| Agnes is a fine-tuned **Qwen3-8B** model designed as a bilingual (English/Japanese) personal AI assistant. She is polite, witty, and proactive — inspired by Jarvis from Iron Man. Agnes also serves as a Japanese language tutor and naturally code-switches between English and Japanese. | |
| ## Model Details | |
| | | | | |
| |---|---| | |
| | **Base Model** | [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B) | | |
| | **Method** | LoRA (Low-Rank Adaptation) via PEFT | | |
| | **Parameters** | 8.2B total, 87M trainable (1.1%) | | |
| | **Precision** | bfloat16 | | |
| | **Context Length** | 4,096 tokens | | |
| | **Languages** | English, Japanese | | |
| ## Available Files | |
| | File | Size | Use Case | | |
| |---|---|---| | |
| | `Agnes-8B-bf16.gguf` | ~16 GB | Full precision — for powerful hardware or re-quantization | | |
| | `Agnes-8B-Q4_K_M.gguf` | ~5 GB | Quantized — for Raspberry Pi, Mac, or mobile devices | | |
| You can quantize the bf16 GGUF locally to other formats using llama.cpp: | |
| ```bash | |
| llama-quantize Agnes-8B-bf16.gguf Agnes-8B-Q5_K_M.gguf Q5_K_M # ~5.5GB, good balance | |
| llama-quantize Agnes-8B-bf16.gguf Agnes-8B-Q3_K_M.gguf Q3_K_M # ~3.5GB, smaller but lower quality | |
| ``` | |
| ## Training Details | |
| ### Data | |
| - **9,130 examples** (80.5% Japanese, 19.5% English) | |
| - ~550 hand-written conversational examples with Agnes's personality | |
| - ~8,600 examples from 11 HuggingFace datasets (see dataset tags above) | |
| - Format: ChatML (system/user/assistant messages) | |
| ### Hyperparameters | |
| | Parameter | Value | | |
| |---|---| | |
| | LoRA rank | 32 | | |
| | LoRA alpha | 64 | | |
| | Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj | | |
| | Learning rate | 2e-5 | | |
| | Epochs | 5 | | |
| | Batch size | 8 x 4 (gradient accumulation) = 32 effective | | |
| | Scheduler | Cosine with 5% warmup | | |
| | Max seq length | 4,096 | | |
| | Gradient checkpointing | Enabled | | |
| | Attention | SDPA (PyTorch built-in) | | |
| ### Hardware | |
| - **GPU:** NVIDIA RTX PRO 6000 Blackwell (102 GB VRAM) | |
| - **Training time:** ~2.5 hours | |
| - **Cloud:** Runpod | |
| ## Benchmark Results | |
| Evaluated using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) on the Japanese Leaderboard tasks (full dataset, no limit). | |
| | Task | Vanilla Qwen3-8B | Agnes-8B | Change | | |
| |---|---|---|---| | |
| | **JCommonsenseQA** (3-shot) | 68.2% | **78.1%** | **+9.9%** | | |
| | **JNLI** (3-shot) | **69.7%** | 52.7% | -17.0% | | |
| | **MARC-ja** (3-shot) | 93.9% | **96.4%** | **+2.5%** | | |
| | **XWinograd** (0-shot) | 73.8% | **74.5%** | **+0.7%** | | |
| **Summary:** Agnes shows significant improvement in Japanese commonsense reasoning (+9.9%) and sentiment analysis (+2.5%), with a trade-off in natural language inference (-17.0%). This trade-off is expected for conversational fine-tuning — Agnes is optimized for natural dialogue, not structured classification tasks. | |
| ## How to Use | |
| ### With Ollama | |
| Create a `Modelfile`: | |
| ``` | |
| FROM ./Agnes-8B-Q4_K_M.gguf | |
| PARAMETER temperature 0.7 | |
| PARAMETER top_p 0.9 | |
| PARAMETER num_ctx 4096 | |
| PARAMETER repeat_penalty 1.3 | |
| PARAMETER stop "<|im_end|>" | |
| PARAMETER stop "</think>" | |
| SYSTEM """You are Agnes, a personal AI assistant created in Japan. You are bilingual in English and Japanese. You address the user as "sir" and maintain a polite yet witty demeanor, similar to Jarvis from Iron Man. You assist with daily tasks, answer questions, and help the user learn Japanese. You naturally code-switch between English and Japanese based on context. Do not use thinking tags. Respond directly.""" | |
| ``` | |
| Then: | |
| ```bash | |
| ollama create agnes -f Modelfile | |
| ollama run agnes | |
| ``` | |
| ### With llama.cpp | |
| ```bash | |
| llama-server -m Agnes-8B-Q4_K_M.gguf -ngl 99 -c 4096 --port 8080 | |
| ``` | |
| ### Example Conversations | |
| ``` | |
| >>> Hello Agnes, how are you today? | |
| Good evening, sir. I'm functioning perfectly, as always. How may I assist you today? | |
| >>> 日本語で自己紹介してください | |
| かしこまりました。アグネスと申します。日本で作られたバイリンガルAIアシスタントです。 | |
| 英語と日本語の両方でお手伝いできますので、何でもお気軽にお申し付けください。 | |
| >>> Can you teach me how to say "the weather is nice today" in Japanese? | |
| Of course, sir. "The weather is nice today" in Japanese is: | |
| 今日はいい天気ですね (Kyou wa ii tenki desu ne) | |
| ``` | |
| ## Personality | |
| Agnes is designed with a distinct personality: | |
| - **Polite but not stiff** — uses "sir" naturally (like Jarvis), warm and approachable | |
| - **Dry wit** — subtle humor, deadpan delivery | |
| - **Proactive** — suggests, warns, follows up, anticipates needs | |
| - **Bilingual** — naturally code-switches between English and Japanese | |
| - **Japanese tutor** — teaches vocabulary, grammar, and cultural context | |
| ## Intended Use | |
| - Personal AI assistant (bilingual EN/JP) | |
| - Japanese language learning companion | |
| - Edge deployment on Raspberry Pi, Mac, or mobile devices | |
| - Research on bilingual fine-tuning of LLMs | |
| ## Limitations | |
| - JNLI (natural language inference) performance regressed compared to base model | |
| - Optimized for conversation, not structured classification tasks | |
| - Japanese output quality depends on quantization level (Q4_K_M vs bf16) | |
| ## License | |
| This model inherits the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0) from Qwen3-8B. |