TeichAI/gemini-3-pro-preview-high-reasoning-1000x
Viewer • Updated • 1.02k • 93 • 79
How to use glogwa68/granite-4.0-h-350m-DISTILL-gemini-think with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="glogwa68/granite-4.0-h-350m-DISTILL-gemini-think")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("glogwa68/granite-4.0-h-350m-DISTILL-gemini-think")
model = AutoModelForCausalLM.from_pretrained("glogwa68/granite-4.0-h-350m-DISTILL-gemini-think", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use glogwa68/granite-4.0-h-350m-DISTILL-gemini-think with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "glogwa68/granite-4.0-h-350m-DISTILL-gemini-think"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "glogwa68/granite-4.0-h-350m-DISTILL-gemini-think",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/glogwa68/granite-4.0-h-350m-DISTILL-gemini-think
How to use glogwa68/granite-4.0-h-350m-DISTILL-gemini-think with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "glogwa68/granite-4.0-h-350m-DISTILL-gemini-think" \
--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": "glogwa68/granite-4.0-h-350m-DISTILL-gemini-think",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "glogwa68/granite-4.0-h-350m-DISTILL-gemini-think" \
--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": "glogwa68/granite-4.0-h-350m-DISTILL-gemini-think",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use glogwa68/granite-4.0-h-350m-DISTILL-gemini-think with Docker Model Runner:
docker model run hf.co/glogwa68/granite-4.0-h-350m-DISTILL-gemini-think
This model is a fine-tuned version of ibm-granite/granite-4.0-h-350m trained on high-reasoning conversational data from Gemini 3 Pro.
<think> tags🔗 GGUF versions available here: granite-4.0-h-350m-DISTILL-gemini-think-GGUF
| Format | Size | Use Case |
|---|---|---|
| Q2_K | Smallest | Low memory, reduced quality |
| Q4_K_M | Recommended | Best balance |
| Q5_K_M | Good | Higher quality |
| Q8_0 | Large | Near lossless |
| F16 | Largest | Original precision |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("glogwa68/granite-4.0-h-350m-DISTILL-gemini-think")
tokenizer = AutoTokenizer.from_pretrained("glogwa68/granite-4.0-h-350m-DISTILL-gemini-think")
messages = [{"role": "user", "content": "Hello, how are you?"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
ollama run hf.co/glogwa68/granite-4.0-h-350m-DISTILL-gemini-think-GGUF:Q4_K_M
llama-cli --hf-repo glogwa68/granite-4.0-h-350m-DISTILL-gemini-think-GGUF --hf-file granite-4.0-h-350m-distill-gemini-think-q4_k_m.gguf -p "Hello"
Apache 2.0