Instructions to use nabin2004/AOS-gemma4-31b-manim-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nabin2004/AOS-gemma4-31b-manim-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nabin2004/AOS-gemma4-31b-manim-merged") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("nabin2004/AOS-gemma4-31b-manim-merged") model = AutoModelForMultimodalLM.from_pretrained("nabin2004/AOS-gemma4-31b-manim-merged", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nabin2004/AOS-gemma4-31b-manim-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nabin2004/AOS-gemma4-31b-manim-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nabin2004/AOS-gemma4-31b-manim-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nabin2004/AOS-gemma4-31b-manim-merged
- SGLang
How to use nabin2004/AOS-gemma4-31b-manim-merged 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 "nabin2004/AOS-gemma4-31b-manim-merged" \ --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": "nabin2004/AOS-gemma4-31b-manim-merged", "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 "nabin2004/AOS-gemma4-31b-manim-merged" \ --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": "nabin2004/AOS-gemma4-31b-manim-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nabin2004/AOS-gemma4-31b-manim-merged with Docker Model Runner:
docker model run hf.co/nabin2004/AOS-gemma4-31b-manim-merged
AOS Gemma 4 31B Manim SFT (Merged)
Full merged bf16 weights (LoRA baked into base) for Manim animation generation via multi-turn tool calling.
Model URL: https://huggingface.co/nabin2004/AOS-gemma4-31b-manim-merged
Related repos
| Artifact | Repo |
|---|---|
| LoRA adapter | nabin2004/AOS-gemma4-31b-manim-sft |
| GGUF (Ollama / llama.cpp) | nabin2004/AOS-gemma4-31b-manim-gguf |
Base model
Merged from google/gemma-4-31B-it and the AOS Manim SFT LoRA adapter. Accept the Gemma license and set HF_TOKEN to download.
Training data
Fine-tuned on nabin2004/AOS-Trajectories using the AOS Phase 1 SFT trainer (apps/sft).
Usage
Load with Transformers
import os
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
token = os.environ["HF_TOKEN"]
model_id = "nabin2004/AOS-gemma4-31b-manim-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id, token=token)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
token=token,
)
vLLM
Serve as a regular model (no --enable-lora needed):
vllm serve nabin2004/AOS-gemma4-31b-manim-merged --max-model-len 16384
Ollama / local GGUF
Convert to GGUF or pull the pre-built GGUF repo. See apps/sft/export_gguf.py.
How this was produced
cd apps/sft
uv run python merge_adapter.py \
--adapter-dir ./gemma4-31b-manim-ft \
--output-dir ./gemma4-31b-manim-merged \
--push-to-hub
- Downloads last month
- 13