canbingol/vngrs-web-corpus-200k
Viewer • Updated • 200k • 15
How to use canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data")
model = AutoModelForCausalLM.from_pretrained("canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data", device_map="auto")How to use canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data
How to use canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data" \
--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": "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data" \
--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": "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data with Docker Model Runner:
docker model run hf.co/canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data
This model is a Turkish Continued Pretraining (CPT) variant of google/gemma-3-1b-pt.
The base model was further trained for 3 epochs on the first 15,000 samples of a Turkish web corpus to improve Turkish language modeling capability and domain familiarity.
This release is intended for research and experimental use.
google/gemma-3-1b-ptcanbingol/vngrs-web-corpus-200kIf you use this model, please cite the base model:
google/gemma-3-1b-ptimport torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "canbingol/gemma3_1B_base-tr-cpt-3epoch_15k_data"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = model.to(device)
prompt = "Benim adım"
inputs = tokenizer(prompt, return_tensors="pt").to(device)
outputs = model.generate(
**inputs,
max_new_tokens=50,
do_sample=True,
temperature=0.8,
top_p=0.9
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
Base model
google/gemma-3-1b-pt