Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
sft
trl
conversational
text-generation-inference
Instructions to use talha970/function-gemma-balanced-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use talha970/function-gemma-balanced-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="talha970/function-gemma-balanced-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("talha970/function-gemma-balanced-v2") model = AutoModelForCausalLM.from_pretrained("talha970/function-gemma-balanced-v2", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use talha970/function-gemma-balanced-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "talha970/function-gemma-balanced-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "talha970/function-gemma-balanced-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/talha970/function-gemma-balanced-v2
- SGLang
How to use talha970/function-gemma-balanced-v2 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 "talha970/function-gemma-balanced-v2" \ --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": "talha970/function-gemma-balanced-v2", "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 "talha970/function-gemma-balanced-v2" \ --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": "talha970/function-gemma-balanced-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use talha970/function-gemma-balanced-v2 with Docker Model Runner:
docker model run hf.co/talha970/function-gemma-balanced-v2
Training in progress, epoch 1
Browse files
README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
model_name: function-gemma-balanced-v2
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
-
- trl
|
| 7 |
- sft
|
|
|
|
| 8 |
licence: license
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for function-gemma-balanced-v2
|
| 12 |
|
| 13 |
-
This model is a fine-tuned version of [
|
| 14 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 15 |
|
| 16 |
## Quick start
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: google/functiongemma-270m-it
|
| 3 |
library_name: transformers
|
| 4 |
model_name: function-gemma-balanced-v2
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- sft
|
| 8 |
+
- trl
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for function-gemma-balanced-v2
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [google/functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
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:865308a77f073756165ab1636545b6367d81382ae1351d758de0b93f0ac10311
|
| 3 |
size 536223056
|
runs/May07_16-48-48_dc674c7bcba4/events.out.tfevents.1778172528.dc674c7bcba4.1256.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4fa90dee16c796e0cd6944c73169131e81bb1051901c966c4cc2f847da7fec77
|
| 3 |
+
size 154228
|
tokenizer_config.json
CHANGED
|
@@ -5,9 +5,8 @@
|
|
| 5 |
"clean_up_tokenization_spaces": false,
|
| 6 |
"eoi_token": "<end_of_image>",
|
| 7 |
"eos_token": "<eos>",
|
| 8 |
-
"extra_special_tokens": [],
|
| 9 |
"image_token": "<image_soft_token>",
|
| 10 |
-
"is_local":
|
| 11 |
"mask_token": "<mask>",
|
| 12 |
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
"model_specific_special_tokens": {
|
|
|
|
| 5 |
"clean_up_tokenization_spaces": false,
|
| 6 |
"eoi_token": "<end_of_image>",
|
| 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": {
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5649
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c166ab690591fac8794576428b015048e858d12f7aab7fa6f855e8c573b29be
|
| 3 |
size 5649
|