Text Generation
Transformers
Safetensors
gemma
trl
sft
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use Rupesh2/gemma_math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rupesh2/gemma_math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rupesh2/gemma_math")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Rupesh2/gemma_math") model = AutoModelForCausalLM.from_pretrained("Rupesh2/gemma_math") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rupesh2/gemma_math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rupesh2/gemma_math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rupesh2/gemma_math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rupesh2/gemma_math
- SGLang
How to use Rupesh2/gemma_math 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 "Rupesh2/gemma_math" \ --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": "Rupesh2/gemma_math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Rupesh2/gemma_math" \ --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": "Rupesh2/gemma_math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rupesh2/gemma_math with Docker Model Runner:
docker model run hf.co/Rupesh2/gemma_math
- Xet hash:
- 7134258e1ccd37083046f0cb2b67ea85c6d65e1dfa3d8c9d4b5ec287c6126131
- Size of remote file:
- 3.16 GB
- SHA256:
- ec0b74f13cab3090bd33183e5e2624955c786d06cee7c085b372f0d178e86602
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.