Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use talha970/function-gemma-new with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use talha970/function-gemma-new with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="talha970/function-gemma-new") 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("talha970/function-gemma-new") model = AutoModelForCausalLM.from_pretrained("talha970/function-gemma-new", 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 talha970/function-gemma-new with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "talha970/function-gemma-new" # 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-new", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/talha970/function-gemma-new
- SGLang
How to use talha970/function-gemma-new 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-new" \ --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-new", "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-new" \ --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-new", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use talha970/function-gemma-new with Docker Model Runner:
docker model run hf.co/talha970/function-gemma-new
Training in progress, epoch 1
Browse files- model.safetensors +1 -1
- runs/May06_16-44-25_909defcf03f7/events.out.tfevents.1778085865.909defcf03f7.804.3 +3 -0
- runs/May06_17-00-31_909defcf03f7/events.out.tfevents.1778086831.909defcf03f7.804.4 +3 -0
- runs/May06_17-11-38_909defcf03f7/events.out.tfevents.1778087498.909defcf03f7.804.5 +3 -0
- training_args.bin +1 -1
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:569db8effe7d329a26f311623da936fa6da0c099c4e5401566729b5af8d99006
|
| 3 |
size 536223056
|
runs/May06_16-44-25_909defcf03f7/events.out.tfevents.1778085865.909defcf03f7.804.3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77190913999ce72c3495832b214f1413f4cc792e1659bfd34bcd8b883d4be5df
|
| 3 |
+
size 27065
|
runs/May06_17-00-31_909defcf03f7/events.out.tfevents.1778086831.909defcf03f7.804.4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e7302532082dcbd6abeaa7df264ae9132959378f23e49499b62a66e99f0782d5
|
| 3 |
+
size 27064
|
runs/May06_17-11-38_909defcf03f7/events.out.tfevents.1778087498.909defcf03f7.804.5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e86b7b4dd8a2bb7477dbec6a254134fa7fe76a8264bb50aa7d6e1b1d2d028fc3
|
| 3 |
+
size 28995
|
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:7f68826202647094bd7c1f9301593987a4eb1e93b9b148de3572b004277e3e72
|
| 3 |
size 5649
|