Text Generation
Transformers
Safetensors
English
gemma2
text-generation-inference
unsloth
trl
conversational
Instructions to use Natet/merged_model_test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Natet/merged_model_test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Natet/merged_model_test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Natet/merged_model_test") model = AutoModelForCausalLM.from_pretrained("Natet/merged_model_test") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Natet/merged_model_test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Natet/merged_model_test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Natet/merged_model_test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Natet/merged_model_test
- SGLang
How to use Natet/merged_model_test 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 "Natet/merged_model_test" \ --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": "Natet/merged_model_test", "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 "Natet/merged_model_test" \ --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": "Natet/merged_model_test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Natet/merged_model_test 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 Natet/merged_model_test 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 Natet/merged_model_test to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Natet/merged_model_test to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Natet/merged_model_test", max_seq_length=2048, ) - Docker Model Runner
How to use Natet/merged_model_test with Docker Model Runner:
docker model run hf.co/Natet/merged_model_test
Upload Gemma2ForCausalLM
Browse files- config.json +1 -2
- generation_config.json +0 -1
- model-00001-of-00002.safetensors +2 -2
- model-00002-of-00002.safetensors +2 -2
config.json
CHANGED
|
@@ -29,9 +29,8 @@
|
|
| 29 |
"rope_scaling": null,
|
| 30 |
"rope_theta": 10000.0,
|
| 31 |
"sliding_window": 4096,
|
| 32 |
-
"torch_dtype": "
|
| 33 |
"transformers_version": "4.50.3",
|
| 34 |
-
"unsloth_version": "2025.3.19",
|
| 35 |
"use_cache": true,
|
| 36 |
"vocab_size": 256000
|
| 37 |
}
|
|
|
|
| 29 |
"rope_scaling": null,
|
| 30 |
"rope_theta": 10000.0,
|
| 31 |
"sliding_window": 4096,
|
| 32 |
+
"torch_dtype": "bfloat16",
|
| 33 |
"transformers_version": "4.50.3",
|
|
|
|
| 34 |
"use_cache": true,
|
| 35 |
"vocab_size": 256000
|
| 36 |
}
|
generation_config.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
| 6 |
1,
|
| 7 |
107
|
| 8 |
],
|
| 9 |
-
"max_length": 8192,
|
| 10 |
"pad_token_id": 0,
|
| 11 |
"transformers_version": "4.50.3"
|
| 12 |
}
|
|
|
|
| 6 |
1,
|
| 7 |
107
|
| 8 |
],
|
|
|
|
| 9 |
"pad_token_id": 0,
|
| 10 |
"transformers_version": "4.50.3"
|
| 11 |
}
|
model-00001-of-00002.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:e46c69d837e9887fabb664ca72f32643e5a290740611ff6596b1dd898e1a968f
|
| 3 |
+
size 4988025760
|
model-00002-of-00002.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:9d57868e58b66efee365c00b705a41a92d2fdbff657dfd1f17b571ff1ecd1f8d
|
| 3 |
+
size 240691728
|