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 252
Browse files
adapter_config.json
CHANGED
|
@@ -30,13 +30,13 @@
|
|
| 30 |
"rank_pattern": {},
|
| 31 |
"revision": null,
|
| 32 |
"target_modules": [
|
| 33 |
-
"
|
| 34 |
-
"up_proj",
|
| 35 |
-
"k_proj",
|
| 36 |
"v_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 |
+
"q_proj",
|
|
|
|
|
|
|
| 34 |
"v_proj",
|
|
|
|
| 35 |
"gate_proj",
|
| 36 |
+
"down_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
+
"o_proj",
|
| 39 |
+
"k_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:e13659177c3de10c09c92fa437a5a9563c3cc951d1d2edc2f22d9d46442bcd5e
|
| 3 |
size 3829712
|
runs/Jun08_14-55-39_45b7d7353d7d/events.out.tfevents.1780930539.45b7d7353d7d.46761.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:40a824c8b2d7363d80755076f8d89e163b4b0226cbaf32a9ba0ca16cb10b6f4d
|
| 3 |
+
size 52064
|
runs/Jun08_15-21-50_45b7d7353d7d/events.out.tfevents.1780932110.45b7d7353d7d.53047.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1deee38ef9fa70e577b4058a9fbc6902e252e506dc5b63e6aa6c0b3657a5d5f
|
| 3 |
+
size 109035
|
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:16ceaebae27fb00ae7e0efb5c55e7582fcca3acb96d3708155b5868035e1c3b2
|
| 3 |
size 5777
|