Instructions to use rapacious/gemma-3-1b-it_Test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rapacious/gemma-3-1b-it_Test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rapacious/gemma-3-1b-it_Test") 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("rapacious/gemma-3-1b-it_Test") model = AutoModelForCausalLM.from_pretrained("rapacious/gemma-3-1b-it_Test", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rapacious/gemma-3-1b-it_Test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rapacious/gemma-3-1b-it_Test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rapacious/gemma-3-1b-it_Test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rapacious/gemma-3-1b-it_Test
- SGLang
How to use rapacious/gemma-3-1b-it_Test 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 "rapacious/gemma-3-1b-it_Test" \ --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": "rapacious/gemma-3-1b-it_Test", "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 "rapacious/gemma-3-1b-it_Test" \ --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": "rapacious/gemma-3-1b-it_Test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rapacious/gemma-3-1b-it_Test with Docker Model Runner:
docker model run hf.co/rapacious/gemma-3-1b-it_Test
Commit History
-
Rename tokenizer (1).json to tokenizer.json
Verified signature9dbb17e -
Upload tokenizer (1).json
Verified signature2d7be32 -
Delete tokenizer.json
Verified signature7fd39ad -
Rename tokenizer (1).json to tokenizer.json
Verified signature9ef956a -
Upload tokenizer (1).json
Verified signature2c1a3ff -
Delete tokenizer.json
Verified signature13d9947 -
Rename tokenizer (1).json to tokenizer.json
Verified signature020d3ea -
Upload tokenizer (1).json
Verified signature816b87f -
Delete tokenizer.json
Verified signatureb99e997 -
Upload: model.safetensors
Verified signature1e79682 -
Upload: tokenizer.json
Verified signaturee98b8db -
Upload: tokenizer.model
Verified signature5264a14 -
Upload: README.md
Verified signaturec76c4f9 -
Upload: tokenizer_config.json
Verified signature2ce3c15 -
Upload: generation_config.json
Verified signature5f4cf74 -
Upload: special_tokens_map.json
Verified signature680d4df -
Upload: .gitattributes
Verified signature1a1cf1c -
Upload: gitattributes
Verified signature2570e43 -
Upload: config.json
Verified signature0b027ae -
Upload: added_tokens.json
Verified signatured225e7c -
initial commit
Verified signature25fd28e