WithinUsAI/Grok4.4_heavy_max_distill_god_seed_25k
Viewer • Updated • 25.7k • 888 • 3
How to use WithinUsAI/Gemma4-Grok-Assistant-E2B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="WithinUsAI/Gemma4-Grok-Assistant-E2B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("WithinUsAI/Gemma4-Grok-Assistant-E2B")
model = AutoModelForCausalLM.from_pretrained("WithinUsAI/Gemma4-Grok-Assistant-E2B")How to use WithinUsAI/Gemma4-Grok-Assistant-E2B with Grok:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
How to use WithinUsAI/Gemma4-Grok-Assistant-E2B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "WithinUsAI/Gemma4-Grok-Assistant-E2B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "WithinUsAI/Gemma4-Grok-Assistant-E2B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/WithinUsAI/Gemma4-Grok-Assistant-E2B
How to use WithinUsAI/Gemma4-Grok-Assistant-E2B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "WithinUsAI/Gemma4-Grok-Assistant-E2B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "WithinUsAI/Gemma4-Grok-Assistant-E2B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "WithinUsAI/Gemma4-Grok-Assistant-E2B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "WithinUsAI/Gemma4-Grok-Assistant-E2B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use WithinUsAI/Gemma4-Grok-Assistant-E2B with Docker Model Runner:
docker model run hf.co/WithinUsAI/Gemma4-Grok-Assistant-E2B
Fine-tuned version of google/gemma-4-E2B-it-assistant on distilled Grok 4.4 conversation data.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained(
"GODsStrongestSoldier/Gemma4-Grok-Assistant-E2B",
trust_remote_code=True,
torch_dtype=torch.bfloat16
)
tokenizer = AutoTokenizer.from_pretrained(
"GODsStrongestSoldier/Gemma4-Grok-Assistant-E2B"
)
prompt = "Write a poem about AI"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0]))
This is the Gemma-4 E2B assistant head model, fine-tuned for improved performance on general instruction-following tasks using Grok 4.4 distillation data. The model was trained with a forward-patch to provide synthetic inputs_embeds and shared_kv_states, since the assistant model normally requires these from the main model.