Text Generation
Transformers
Safetensors
gemma3_text
Generated from Trainer
sft
trl
conversational
text-generation-inference
Instructions to use gue22/functiongemma-270m-it-mobile-actions with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gue22/functiongemma-270m-it-mobile-actions with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gue22/functiongemma-270m-it-mobile-actions") 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("gue22/functiongemma-270m-it-mobile-actions") model = AutoModelForCausalLM.from_pretrained("gue22/functiongemma-270m-it-mobile-actions", 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 gue22/functiongemma-270m-it-mobile-actions with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gue22/functiongemma-270m-it-mobile-actions" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gue22/functiongemma-270m-it-mobile-actions", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gue22/functiongemma-270m-it-mobile-actions
- SGLang
How to use gue22/functiongemma-270m-it-mobile-actions 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 "gue22/functiongemma-270m-it-mobile-actions" \ --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": "gue22/functiongemma-270m-it-mobile-actions", "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 "gue22/functiongemma-270m-it-mobile-actions" \ --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": "gue22/functiongemma-270m-it-mobile-actions", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gue22/functiongemma-270m-it-mobile-actions with Docker Model Runner:
docker model run hf.co/gue22/functiongemma-270m-it-mobile-actions
Upload 2 files
Browse files
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
funcgemma-mobile-actions-litertlm/mobile-actions_q8_ekv1024.litertlm filter=lfs diff=lfs merge=lfs -text
|
funcgemma-mobile-actions-litertlm/base_llm_metadata.textproto
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
start_token: {
|
| 2 |
+
token_ids: {
|
| 3 |
+
ids: [ 2 ]
|
| 4 |
+
}
|
| 5 |
+
}
|
| 6 |
+
stop_tokens: {
|
| 7 |
+
token_str: "<end_of_turn>"
|
| 8 |
+
}
|
| 9 |
+
stop_tokens: {
|
| 10 |
+
token_str: "<start_function_response>"
|
| 11 |
+
}
|
| 12 |
+
llm_model_type: {
|
| 13 |
+
function_gemma: {}
|
| 14 |
+
}
|
funcgemma-mobile-actions-litertlm/mobile-actions_q8_ekv1024.litertlm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9b6e3cd2bd53714eb18acd85f460d39a3054f1f241b0087ac0dbc4240d308d64
|
| 3 |
+
size 284426240
|