Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
sft
trl
conversational
text-generation-inference
Instructions to use Saad4web/functiongemma-270m-it-simple-tool-calling with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Saad4web/functiongemma-270m-it-simple-tool-calling with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Saad4web/functiongemma-270m-it-simple-tool-calling") 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("Saad4web/functiongemma-270m-it-simple-tool-calling") model = AutoModelForCausalLM.from_pretrained("Saad4web/functiongemma-270m-it-simple-tool-calling", 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 Saad4web/functiongemma-270m-it-simple-tool-calling with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Saad4web/functiongemma-270m-it-simple-tool-calling" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saad4web/functiongemma-270m-it-simple-tool-calling", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Saad4web/functiongemma-270m-it-simple-tool-calling
- SGLang
How to use Saad4web/functiongemma-270m-it-simple-tool-calling 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 "Saad4web/functiongemma-270m-it-simple-tool-calling" \ --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": "Saad4web/functiongemma-270m-it-simple-tool-calling", "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 "Saad4web/functiongemma-270m-it-simple-tool-calling" \ --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": "Saad4web/functiongemma-270m-it-simple-tool-calling", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Saad4web/functiongemma-270m-it-simple-tool-calling with Docker Model Runner:
docker model run hf.co/Saad4web/functiongemma-270m-it-simple-tool-calling
Training in progress, step 64
Browse files- model.safetensors +1 -1
- runs/Jul18_23-41-27_68b5134d9a1e/events.out.tfevents.1784418087.68b5134d9a1e.3775.0 +3 -0
- runs/Jul18_23-52-11_68b5134d9a1e/events.out.tfevents.1784418731.68b5134d9a1e.8582.0 +3 -0
- runs/Jul19_01-38-30_36d3a552b7fe/events.out.tfevents.1784425111.36d3a552b7fe.2282.0 +3 -0
- training_args.bin +1 -1
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 536223056
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:90fafd2f0e4520262af083bde5d7a030d4d656302be5911936878fc6af815d02
|
| 3 |
size 536223056
|
runs/Jul18_23-41-27_68b5134d9a1e/events.out.tfevents.1784418087.68b5134d9a1e.3775.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d6f6912de181b41ec59ead4e78721081ef979dcebe762f3add47825c03f9a58
|
| 3 |
+
size 6536
|
runs/Jul18_23-52-11_68b5134d9a1e/events.out.tfevents.1784418731.68b5134d9a1e.8582.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12654c144fa83dd8022c3c0b0a16f4d809c9433a339f719dad18931bbcfc77d5
|
| 3 |
+
size 6536
|
runs/Jul19_01-38-30_36d3a552b7fe/events.out.tfevents.1784425111.36d3a552b7fe.2282.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9815a6f5b4284b45264e0fcc918af46a393c1c8c72b746c2eadb9bb1cbf38533
|
| 3 |
+
size 31857
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5777
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0affdec97b937028931f54c1e26c34a8ef28902920e722e1e9308f95366defa5
|
| 3 |
size 5777
|