How to use from
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 "ZeynepAltundal/Wikipedia" \
    --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": "ZeynepAltundal/Wikipedia",
		"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 "ZeynepAltundal/Wikipedia" \
        --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": "ZeynepAltundal/Wikipedia",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

Model Overview:

This model is a fine-tuned version of the "ytu-ce-cosmos/turkish-gpt2-medium-350m-instruct-v0.1", designed specifically for Turkish Question-Answering (Q&A). The fine-tuning process utilized a custom dataset generated from Turkish Wikipedia articles, focusing on factual knowledge.

Base Model: ytu-ce-cosmos/turkish-gpt2-medium-350m-instruct-v0.1 Fine-Tuned Dataset: Custom Turkish Q&A dataset Evaluation Loss: 2.1461 (on the validation dataset)

Quick Start

from transformers import AutoTokenizer, AutoModelForCausalLM


model_name = "./fine_tuned_model"  # Replace with your Hugging Face model path if uploaded
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)


question = "Kamu sosyolojisi nedir?"


input_ids = tokenizer(question, return_tensors="pt").input_ids


output = model.generate(
    input_ids=input_ids,
    max_length=50,
    num_return_sequences=1,
    temperature=0.7
)

response = tokenizer.decode(output[0], skip_special_tokens=True)
print(f"Question: {question}")
print(f"Answer: {response}")

Training Details:

Dataset Source: Custom dataset generated from Turkish Wikipedia Number of Training Examples: 2,606 Training Dataset Size: 2,084 (80%) Validation Dataset Size: 522 (20%) Number of Epochs: 3 Batch Size: 8 Learning Rate: 5e-5 Evaluation Loss: 2.1461

Downloads last month
18
Safetensors
Model size
0.4B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ZeynepAltundal/Wikipedia

Dataset used to train ZeynepAltundal/Wikipedia