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
CHANGED
|
@@ -4,8 +4,8 @@ library_name: transformers
|
|
| 4 |
model_name: functiongemma-270m-it-simple-tool-calling
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- sft
|
| 8 |
- trl
|
|
|
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
|
|
|
| 4 |
model_name: functiongemma-270m-it-simple-tool-calling
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
+
- sft
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
adapter_config.json
CHANGED
|
@@ -30,13 +30,13 @@
|
|
| 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 |
-
"
|
| 40 |
],
|
| 41 |
"target_parameters": null,
|
| 42 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 30 |
"rank_pattern": {},
|
| 31 |
"revision": null,
|
| 32 |
"target_modules": [
|
|
|
|
|
|
|
| 33 |
"o_proj",
|
| 34 |
+
"up_proj",
|
| 35 |
"k_proj",
|
| 36 |
+
"v_proj",
|
| 37 |
"down_proj",
|
| 38 |
"gate_proj",
|
| 39 |
+
"q_proj"
|
| 40 |
],
|
| 41 |
"target_parameters": null,
|
| 42 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3829712
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:052dd2d4025eab184c8489d06b15f579a88f02825c649306ed48cdd83d4ebbe4
|
| 3 |
size 3829712
|
runs/Jun08_13-43-41_45b7d7353d7d/events.out.tfevents.1780926221.45b7d7353d7d.28619.0
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:41dc966862400f66f82f45ab854c6695617048b1c73f513a90b702fb253cc9a7
|
| 3 |
+
size 52064
|
runs/Jun08_14-55-39_45b7d7353d7d/events.out.tfevents.1780930539.45b7d7353d7d.46761.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45c8990002cf2fc82933250d438504ff26da1a9bfd1ad91ba24d6fd743ed2cb2
|
| 3 |
+
size 51285
|