Text Generation
Transformers
Safetensors
PEFT
English
function-calling
xkcd
gemma
unsloth
lora
conversational
Instructions to use gnumanth/xkcd-functiongemma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gnumanth/xkcd-functiongemma with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gnumanth/xkcd-functiongemma") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gnumanth/xkcd-functiongemma", device_map="auto") - PEFT
How to use gnumanth/xkcd-functiongemma with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gnumanth/xkcd-functiongemma with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gnumanth/xkcd-functiongemma" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gnumanth/xkcd-functiongemma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gnumanth/xkcd-functiongemma
- SGLang
How to use gnumanth/xkcd-functiongemma 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 "gnumanth/xkcd-functiongemma" \ --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": "gnumanth/xkcd-functiongemma", "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 "gnumanth/xkcd-functiongemma" \ --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": "gnumanth/xkcd-functiongemma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use gnumanth/xkcd-functiongemma with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for gnumanth/xkcd-functiongemma to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for gnumanth/xkcd-functiongemma to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gnumanth/xkcd-functiongemma to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="gnumanth/xkcd-functiongemma", max_seq_length=2048, ) - Docker Model Runner
How to use gnumanth/xkcd-functiongemma with Docker Model Runner:
docker model run hf.co/gnumanth/xkcd-functiongemma
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- README.md +2 -1
- adapter_config.json +15 -6
- adapter_model.safetensors +2 -2
README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- unsloth
|
| 5 |
---
|
| 6 |
|
| 7 |
# Model Card for Model ID
|
adapter_config.json
CHANGED
|
@@ -2,8 +2,12 @@
|
|
| 2 |
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
"arrow_config": null,
|
| 5 |
-
"auto_mapping":
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"bias": "none",
|
| 8 |
"corda_config": null,
|
| 9 |
"ensure_weight_tying": false,
|
|
@@ -16,21 +20,26 @@
|
|
| 16 |
"layers_pattern": null,
|
| 17 |
"layers_to_transform": null,
|
| 18 |
"loftq_config": {},
|
| 19 |
-
"lora_alpha":
|
| 20 |
"lora_bias": false,
|
| 21 |
-
"lora_dropout": 0
|
| 22 |
"megatron_config": null,
|
| 23 |
"megatron_core": "megatron.core",
|
| 24 |
"modules_to_save": null,
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.0",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
-
"r":
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
"q_proj",
|
| 33 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
],
|
| 35 |
"target_parameters": null,
|
| 36 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 2 |
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
"arrow_config": null,
|
| 5 |
+
"auto_mapping": {
|
| 6 |
+
"base_model_class": "Gemma3ForCausalLM",
|
| 7 |
+
"parent_library": "transformers.models.gemma3.modeling_gemma3",
|
| 8 |
+
"unsloth_fixed": true
|
| 9 |
+
},
|
| 10 |
+
"base_model_name_or_path": "unsloth/functiongemma-270m-it-unsloth-bnb-4bit",
|
| 11 |
"bias": "none",
|
| 12 |
"corda_config": null,
|
| 13 |
"ensure_weight_tying": false,
|
|
|
|
| 20 |
"layers_pattern": null,
|
| 21 |
"layers_to_transform": null,
|
| 22 |
"loftq_config": {},
|
| 23 |
+
"lora_alpha": 16,
|
| 24 |
"lora_bias": false,
|
| 25 |
+
"lora_dropout": 0,
|
| 26 |
"megatron_config": null,
|
| 27 |
"megatron_core": "megatron.core",
|
| 28 |
"modules_to_save": null,
|
| 29 |
"peft_type": "LORA",
|
| 30 |
"peft_version": "0.18.0",
|
| 31 |
"qalora_group_size": 16,
|
| 32 |
+
"r": 16,
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
"q_proj",
|
| 37 |
+
"o_proj",
|
| 38 |
+
"gate_proj",
|
| 39 |
+
"k_proj",
|
| 40 |
+
"v_proj",
|
| 41 |
+
"up_proj",
|
| 42 |
+
"down_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
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:87f7e1171eef5873ba1fe4c4a4d5aa4a71f2be92424c3605d43f4798f6b12043
|
| 3 |
+
size 15220968
|