Text Generation
Transformers
Safetensors
English
gemma3_text
gemma
gemma3
tunix
grpo
reasoning
thinking
conversational
text-generation-inference
Instructions to use KeeganCarey/gemma-3-1b-it-amr_thinking-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KeeganCarey/gemma-3-1b-it-amr_thinking-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KeeganCarey/gemma-3-1b-it-amr_thinking-2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KeeganCarey/gemma-3-1b-it-amr_thinking-2") model = AutoModelForCausalLM.from_pretrained("KeeganCarey/gemma-3-1b-it-amr_thinking-2", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KeeganCarey/gemma-3-1b-it-amr_thinking-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KeeganCarey/gemma-3-1b-it-amr_thinking-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KeeganCarey/gemma-3-1b-it-amr_thinking-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KeeganCarey/gemma-3-1b-it-amr_thinking-2
- SGLang
How to use KeeganCarey/gemma-3-1b-it-amr_thinking-2 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 "KeeganCarey/gemma-3-1b-it-amr_thinking-2" \ --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": "KeeganCarey/gemma-3-1b-it-amr_thinking-2", "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 "KeeganCarey/gemma-3-1b-it-amr_thinking-2" \ --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": "KeeganCarey/gemma-3-1b-it-amr_thinking-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KeeganCarey/gemma-3-1b-it-amr_thinking-2 with Docker Model Runner:
docker model run hf.co/KeeganCarey/gemma-3-1b-it-amr_thinking-2
|
Download README.md from KeeganCarey/gemma-3-1b-it-amr_thinking-2: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/KeeganCarey/gemma-3-1b-it-amr_thinking-2/resolve/main/README.md
- Command line
-
hf download hf://KeeganCarey/gemma-3-1b-it-amr_thinking-2/README.md
-
curl -L -o README.md https://huggingface.co/KeeganCarey/gemma-3-1b-it-amr_thinking-2/resolve/main/README.md
1.18 kB
| license: gemma | |
| tags: | |
| - gemma | |
| - gemma3 | |
| - tunix | |
| - grpo | |
| - reasoning | |
| - thinking | |
| library_name: transformers | |
| language: | |
| - en | |
| base_model: | |
| - chimbiwide/gemma-3-1b-it-thinking-32k-sft-base | |
| # GemmaThink-32k (GRPO Trained) | |
| This model was trained using GRPO (Group Relative Policy Optimization) to generate structured reasoning traces. | |
| ## Training Details | |
| - **Base Model**: chimbiwide/gemma-3-1b-it-thinking-32k-sft-base | |
| - **Training Method**: SFT + GRPO | |
| - **LoRA Rank**: 32 | |
| - **LoRA Alpha**: 64.0 | |
| - **Framework**: Tunix (JAX) | |
| - **Hardware**: v6e-1 TPU in Colab | |
| ## Output Format | |
| ``` | |
| <reasoning>step-by-step thinking process</reasoning> | |
| <answer>final answer</answer> | |
| ``` | |
| ## Quicklinks: | |
| - ***[SFT Base Model](https://huggingface.co/chimbiwide/gemma-3-1b-it-thinking-32k-sft-base)*** | |
| - ***[SFT Base Model Q8 GGUF](https://huggingface.co/chimbiwide/gemma-3-1b-it-thinking-32k-sft-base-Q8_0-GGUF)*** | |
| - ***[GRPO Full Model](https://huggingface.co/chimbiwide/gemma-3-1b-it-thinking-32k-grpo-merged)*** <-- You're here | |
| - ***[Q8-GGUF](https://huggingface.co/chimbiwide/gemma-3-1b-it-thinking-32k-grpo-merged-Q8_0-GGUF)*** | |
| - ***[Article](https://huggingface.co/blog/chimbiwide/gemma3think)*** |