Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use Spoon-assassin/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 Spoon-assassin/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="Spoon-assassin/functiongemma-270m-it-simple-tool-calling") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Spoon-assassin/functiongemma-270m-it-simple-tool-calling") model = AutoModelForCausalLM.from_pretrained("Spoon-assassin/functiongemma-270m-it-simple-tool-calling") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Spoon-assassin/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 "Spoon-assassin/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": "Spoon-assassin/functiongemma-270m-it-simple-tool-calling", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Spoon-assassin/functiongemma-270m-it-simple-tool-calling
- SGLang
How to use Spoon-assassin/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 "Spoon-assassin/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": "Spoon-assassin/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 "Spoon-assassin/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": "Spoon-assassin/functiongemma-270m-it-simple-tool-calling", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Spoon-assassin/functiongemma-270m-it-simple-tool-calling with Docker Model Runner:
docker model run hf.co/Spoon-assassin/functiongemma-270m-it-simple-tool-calling
Training in progress, step 112
Browse files- README.md +5 -5
- adapter_config.json +48 -0
- adapter_model.safetensors +3 -0
- runs/Jun08_12-04-24_45b7d7353d7d/events.out.tfevents.1780920264.45b7d7353d7d.2648.0 +3 -0
- runs/Jun08_12-59-06_45b7d7353d7d/events.out.tfevents.1780923546.45b7d7353d7d.16320.0 +3 -0
- runs/Jun08_13-06-18_45b7d7353d7d/events.out.tfevents.1780923978.45b7d7353d7d.18354.0 +3 -0
- runs/Jun08_13-11-51_45b7d7353d7d/events.out.tfevents.1780924311.45b7d7353d7d.19969.0 +3 -0
- runs/Jun08_13-17-24_45b7d7353d7d/events.out.tfevents.1780924644.45b7d7353d7d.21521.0 +3 -0
- runs/Jun08_13-38-58_45b7d7353d7d/events.out.tfevents.1780925938.45b7d7353d7d.27315.0 +3 -0
- runs/Jun08_13-43-41_45b7d7353d7d/events.out.tfevents.1780926221.45b7d7353d7d.28619.0 +3 -0
- tokenizer.json +2 -2
- tokenizer_config.json +1 -0
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -4,8 +4,8 @@ library_name: transformers
|
|
| 4 |
model_name: functiongemma-270m-it-simple-tool-calling
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- trl
|
| 8 |
- sft
|
|
|
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
|
@@ -35,10 +35,10 @@ This model was trained with SFT.
|
|
| 35 |
|
| 36 |
### Framework versions
|
| 37 |
|
| 38 |
-
- TRL: 1.
|
| 39 |
-
- Transformers: 5.
|
| 40 |
-
- Pytorch: 2.
|
| 41 |
-
- Datasets:
|
| 42 |
- Tokenizers: 0.22.2
|
| 43 |
|
| 44 |
## Citations
|
|
|
|
| 4 |
model_name: functiongemma-270m-it-simple-tool-calling
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- sft
|
| 8 |
+
- trl
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
|
|
|
| 35 |
|
| 36 |
### Framework versions
|
| 37 |
|
| 38 |
+
- TRL: 1.5.1
|
| 39 |
+
- Transformers: 5.9.0
|
| 40 |
+
- Pytorch: 2.11.0+cu128
|
| 41 |
+
- Datasets: 5.0.0
|
| 42 |
- Tokenizers: 0.22.2
|
| 43 |
|
| 44 |
## Citations
|
adapter_config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "google/functiongemma-270m-it",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 16,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 8,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": null,
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"v_proj",
|
| 34 |
+
"q_proj",
|
| 35 |
+
"o_proj",
|
| 36 |
+
"k_proj",
|
| 37 |
+
"down_proj",
|
| 38 |
+
"gate_proj",
|
| 39 |
+
"up_proj"
|
| 40 |
+
],
|
| 41 |
+
"target_parameters": null,
|
| 42 |
+
"task_type": "CAUSAL_LM",
|
| 43 |
+
"trainable_token_indices": null,
|
| 44 |
+
"use_bdlora": null,
|
| 45 |
+
"use_dora": false,
|
| 46 |
+
"use_qalora": false,
|
| 47 |
+
"use_rslora": false
|
| 48 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80d6f4fb461359b2b405f4e8023a15eb2e75de442efb8599870d1d7913e344fc
|
| 3 |
+
size 3829712
|
runs/Jun08_12-04-24_45b7d7353d7d/events.out.tfevents.1780920264.45b7d7353d7d.2648.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c52157ef2bba0493b49da89bff1f1ab65754b6090f215f3ffd6848fd4b387f7e
|
| 3 |
+
size 4184
|
runs/Jun08_12-59-06_45b7d7353d7d/events.out.tfevents.1780923546.45b7d7353d7d.16320.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9f261e1a074ba3b6b5cc33c6833214f9b2267e3dd485aaade4817cfa071654b
|
| 3 |
+
size 6267
|
runs/Jun08_13-06-18_45b7d7353d7d/events.out.tfevents.1780923978.45b7d7353d7d.18354.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4521c212c82a66b382ebe8fa834adc6b26203c300f9a4796c0045117049c20c3
|
| 3 |
+
size 6266
|
runs/Jun08_13-11-51_45b7d7353d7d/events.out.tfevents.1780924311.45b7d7353d7d.19969.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2fb13f3f861c8ab134364f961ac188f8093854ca42ec59f4ace3b6887882dbd
|
| 3 |
+
size 6266
|
runs/Jun08_13-17-24_45b7d7353d7d/events.out.tfevents.1780924644.45b7d7353d7d.21521.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55e52141e07e75e05efe5a15b0eaef4cfca63967dd76e81d3ac69d5c80a030ca
|
| 3 |
+
size 6266
|
runs/Jun08_13-38-58_45b7d7353d7d/events.out.tfevents.1780925938.45b7d7353d7d.27315.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:759507ff42f41d8764a506f8c6738cbab4f24b39a6aadc1485dc03e49d3d8eaf
|
| 3 |
+
size 4184
|
runs/Jun08_13-43-41_45b7d7353d7d/events.out.tfevents.1780926221.45b7d7353d7d.28619.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e69df67ab57f744ae9df52f3de7b967f3f45ffc652ec09b526ad6c792a47cd3a
|
| 3 |
+
size 51285
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80d7f800b949accd7eb940bac75e642f9468e4df157403032a55bf54ed23b650
|
| 3 |
+
size 33384898
|
tokenizer_config.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
| 7 |
"eos_token": "<eos>",
|
| 8 |
"image_token": "<image_soft_token>",
|
| 9 |
"is_local": false,
|
|
|
|
| 10 |
"mask_token": "<mask>",
|
| 11 |
"model_max_length": 1000000000000000019884624838656,
|
| 12 |
"model_specific_special_tokens": {
|
|
|
|
| 7 |
"eos_token": "<eos>",
|
| 8 |
"image_token": "<image_soft_token>",
|
| 9 |
"is_local": false,
|
| 10 |
+
"local_files_only": false,
|
| 11 |
"mask_token": "<mask>",
|
| 12 |
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
"model_specific_special_tokens": {
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e782c9b71d826f399de936ae3c3b865bc02c28aee3a10f84b5af247e0f3494d
|
| 3 |
+
size 5777
|