Text Generation
Transformers
Safetensors
English
Turkish
gemma2
text-generation-inference
unsloth
trl
Instructions to use atasoglu/gemma-2-2b-tr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use atasoglu/gemma-2-2b-tr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="atasoglu/gemma-2-2b-tr")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("atasoglu/gemma-2-2b-tr") model = AutoModelForCausalLM.from_pretrained("atasoglu/gemma-2-2b-tr") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use atasoglu/gemma-2-2b-tr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "atasoglu/gemma-2-2b-tr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "atasoglu/gemma-2-2b-tr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/atasoglu/gemma-2-2b-tr
- SGLang
How to use atasoglu/gemma-2-2b-tr 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 "atasoglu/gemma-2-2b-tr" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "atasoglu/gemma-2-2b-tr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "atasoglu/gemma-2-2b-tr" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "atasoglu/gemma-2-2b-tr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use atasoglu/gemma-2-2b-tr 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 atasoglu/gemma-2-2b-tr 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 atasoglu/gemma-2-2b-tr to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for atasoglu/gemma-2-2b-tr to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="atasoglu/gemma-2-2b-tr", max_seq_length=2048, ) - Docker Model Runner
How to use atasoglu/gemma-2-2b-tr with Docker Model Runner:
docker model run hf.co/atasoglu/gemma-2-2b-tr
Trained with Unsloth
Browse files- README.md +2 -2
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/gemma-2-2b-bnb-4bit
|
|
|
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
- tr
|
|
@@ -10,8 +12,6 @@ tags:
|
|
| 10 |
- unsloth
|
| 11 |
- gemma2
|
| 12 |
- trl
|
| 13 |
-
datasets:
|
| 14 |
-
- myzens/alpaca-turkish-combined
|
| 15 |
---
|
| 16 |
|
| 17 |
# Uploaded model
|
|
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/gemma-2-2b-bnb-4bit
|
| 3 |
+
datasets:
|
| 4 |
+
- myzens/alpaca-turkish-combined
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
- tr
|
|
|
|
| 12 |
- unsloth
|
| 13 |
- gemma2
|
| 14 |
- trl
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# Uploaded model
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4988025760
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4f88eb1ede7a0a83e0913bba67857a0b00d8f2fb9b68ab92b11fe75f77621bd
|
| 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 240691728
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:615512633060b642e5b254ba2e0d4abec82abb98e96155327a2f481f37103095
|
| 3 |
size 240691728
|