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
Commit History
-
Training in progress, epoch 5
Verified signature773fd80 -
Training in progress, epoch 4
Verified signature9f6032c -
Training in progress, epoch 3
Verified signature97c30ac -
Training in progress, epoch 2
Verified signaturee77381f -
Training in progress, epoch 1
Verified signature992fe2d -
Training in progress, epoch 5
Verified signaturedbff7bb -
Training in progress, epoch 4
Verified signaturede27166 -
Training in progress, epoch 3
Verified signature09bc595 -
Training in progress, epoch 2
Verified signature2ebd00d -
Training in progress, epoch 1
Verified signaturedebec6d -
Training in progress, epoch 5
Verified signaturea780731 -
Training in progress, epoch 4
Verified signaturedc04832 -
Training in progress, epoch 3
Verified signaturea2693d3 -
Training in progress, epoch 2
Verified signaturef768972 -
Training in progress, epoch 1
Verified signature4ad4ce6 -
Training in progress, epoch 5
Verified signature720f8c4 -
Training in progress, epoch 4
Verified signaturee5dfc6f -
Training in progress, epoch 3
Verified signature8b2e95d -
Training in progress, epoch 2
Verified signature4c3c6af -
Training in progress, epoch 1
Verified signature100986f -
Training in progress, epoch 8
Verified signature8025803 -
Training in progress, epoch 7
Verified signaturee54b705 -
Training in progress, epoch 6
Verified signature48dc2e8