Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use rubenz-org/gemma3_google with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rubenz-org/gemma3_google with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rubenz-org/gemma3_google") 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("rubenz-org/gemma3_google") model = AutoModelForCausalLM.from_pretrained("rubenz-org/gemma3_google", 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 rubenz-org/gemma3_google with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rubenz-org/gemma3_google" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rubenz-org/gemma3_google", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rubenz-org/gemma3_google
- SGLang
How to use rubenz-org/gemma3_google 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 "rubenz-org/gemma3_google" \ --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": "rubenz-org/gemma3_google", "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 "rubenz-org/gemma3_google" \ --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": "rubenz-org/gemma3_google", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rubenz-org/gemma3_google with Docker Model Runner:
docker model run hf.co/rubenz-org/gemma3_google
Training in progress, epoch 2
Browse files- README.md +2 -2
- config.json +1 -1
- model.safetensors +1 -1
- runs/Oct17_03-02-21_llmsvr/events.out.tfevents.1760650345.llmsvr.220029.0 +3 -0
- runs/Oct17_03-30-34_llmsvr/events.out.tfevents.1760652038.llmsvr.299567.0 +3 -0
- runs/Oct18_06-31-10_llmsvr/events.out.tfevents.1760749274.llmsvr.126427.0 +3 -0
- special_tokens_map.json +1 -7
- tokenizer_config.json +1 -1
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -4,8 +4,8 @@ library_name: transformers
|
|
| 4 |
model_name: gemma3_google
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- sft
|
| 8 |
- trl
|
|
|
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
|
@@ -20,7 +20,7 @@ It has been trained using [TRL](https://github.com/huggingface/trl).
|
|
| 20 |
from transformers import pipeline
|
| 21 |
|
| 22 |
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
-
generator = pipeline("text-generation", model="
|
| 24 |
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
print(output["generated_text"])
|
| 26 |
```
|
|
|
|
| 4 |
model_name: gemma3_google
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
+
- sft
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
|
|
|
| 20 |
from transformers import pipeline
|
| 21 |
|
| 22 |
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
+
generator = pipeline("text-generation", model="rubenz-org/gemma3_google", device="cuda")
|
| 24 |
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
print(output["generated_text"])
|
| 26 |
```
|
config.json
CHANGED
|
@@ -49,6 +49,6 @@
|
|
| 49 |
"torch_dtype": "bfloat16",
|
| 50 |
"transformers_version": "4.55.4",
|
| 51 |
"use_bidirectional_attention": false,
|
| 52 |
-
"use_cache":
|
| 53 |
"vocab_size": 262144
|
| 54 |
}
|
|
|
|
| 49 |
"torch_dtype": "bfloat16",
|
| 50 |
"transformers_version": "4.55.4",
|
| 51 |
"use_bidirectional_attention": false,
|
| 52 |
+
"use_cache": false,
|
| 53 |
"vocab_size": 262144
|
| 54 |
}
|
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:d1a675457af0c9c535cd22e1cc40239e0d81a0b614177efd1db75f9474afdfba
|
| 3 |
size 536223056
|
runs/Oct17_03-02-21_llmsvr/events.out.tfevents.1760650345.llmsvr.220029.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa14b96086f7d297ae10600e8e8c931d5ce0d40cec11fe61e60c91baa6518036
|
| 3 |
+
size 9850
|
runs/Oct17_03-30-34_llmsvr/events.out.tfevents.1760652038.llmsvr.299567.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:839f47fcfea1f40b00ddc4c0c09180041d52d2f746f12d854e6626617b9868a8
|
| 3 |
+
size 87695
|
runs/Oct18_06-31-10_llmsvr/events.out.tfevents.1760749274.llmsvr.126427.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e378a7f05d22e65a219feeaf531cf123479f7fd0db6ec5feae0412edc0884da
|
| 3 |
+
size 87695
|
special_tokens_map.json
CHANGED
|
@@ -8,13 +8,7 @@
|
|
| 8 |
"single_word": false
|
| 9 |
},
|
| 10 |
"eoi_token": "<end_of_image>",
|
| 11 |
-
"eos_token":
|
| 12 |
-
"content": "<eos>",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false
|
| 17 |
-
},
|
| 18 |
"image_token": "<image_soft_token>",
|
| 19 |
"pad_token": {
|
| 20 |
"content": "<pad>",
|
|
|
|
| 8 |
"single_word": false
|
| 9 |
},
|
| 10 |
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": "<unk>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
"image_token": "<image_soft_token>",
|
| 13 |
"pad_token": {
|
| 14 |
"content": "<pad>",
|
tokenizer_config.json
CHANGED
|
@@ -51327,7 +51327,7 @@
|
|
| 51327 |
"bos_token": "<bos>",
|
| 51328 |
"clean_up_tokenization_spaces": false,
|
| 51329 |
"eoi_token": "<end_of_image>",
|
| 51330 |
-
"eos_token": "<
|
| 51331 |
"extra_special_tokens": {
|
| 51332 |
"boi_token": "<start_of_image>",
|
| 51333 |
"eoi_token": "<end_of_image>",
|
|
|
|
| 51327 |
"bos_token": "<bos>",
|
| 51328 |
"clean_up_tokenization_spaces": false,
|
| 51329 |
"eoi_token": "<end_of_image>",
|
| 51330 |
+
"eos_token": "<unk>",
|
| 51331 |
"extra_special_tokens": {
|
| 51332 |
"boi_token": "<start_of_image>",
|
| 51333 |
"eoi_token": "<end_of_image>",
|
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:be0f85e2e45442c7078bda0ad3aabc844f478387f9434edd7819c06714edf056
|
| 3 |
+
size 6289
|