Instructions to use anilguven/Qwen2.5-1.5B-TrSummarization-unsloth with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anilguven/Qwen2.5-1.5B-TrSummarization-unsloth with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anilguven/Qwen2.5-1.5B-TrSummarization-unsloth")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("anilguven/Qwen2.5-1.5B-TrSummarization-unsloth", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use anilguven/Qwen2.5-1.5B-TrSummarization-unsloth with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/anilguven/Qwen2.5-1.5B-TrSummarization-unsloth
- SGLang
How to use anilguven/Qwen2.5-1.5B-TrSummarization-unsloth 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 "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth" \ --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": "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth", "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 "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth" \ --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": "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use anilguven/Qwen2.5-1.5B-TrSummarization-unsloth 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 anilguven/Qwen2.5-1.5B-TrSummarization-unsloth 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 anilguven/Qwen2.5-1.5B-TrSummarization-unsloth to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for anilguven/Qwen2.5-1.5B-TrSummarization-unsloth to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="anilguven/Qwen2.5-1.5B-TrSummarization-unsloth", max_seq_length=2048, ) - Docker Model Runner
How to use anilguven/Qwen2.5-1.5B-TrSummarization-unsloth with Docker Model Runner:
docker model run hf.co/anilguven/Qwen2.5-1.5B-TrSummarization-unsloth
Introduction
Model was tested 1500 wikipedia articles, and was measured by these metrics:
- Model's average Rouge-1 score: 0.472
- Model's averageRouge-l score: 0.382
- Model's average Bertscore: 0.694
- GGUF version: https://huggingface.co/anilguven/Qwen2.5-1.5B-TrSummarization-unsloth-GGUF
Usage 🚀
from unsloth import FastLanguageModel
max_seq_length = 1024 # Choose any! We auto support RoPE Scaling internally!
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "anilguven/Qwen2.5-1.5B-TrSummarization-unsloth", # YOUR MODEL YOU USED FOR TRAINING
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
Example
prompt = """Aşağıda, bir girdinin özet hali çıktıda verilmiştir. Girdiyi uygun şekilde özetleyin.
### Input (Girdi):
{}
### Response (Yanıt):
{}"""
inputs = tokenizer(
[
prompt.format(
"""IBOR Interbank Offered Rate (Bankalararası Teklif edilen Faiz oranı) başharfleridır. Belirtilmiş bir zamanda, ilk kategoriden bir Bankanın ayni kategoriden başka bir bankaya, hiçbir karşılık garanti verilmeden (İngilizcesı : unsecured lending), ödünç verilmesı için kullanılan faiz oranıdır. Ödünç karşılığında hiçbir varlık ya da güvenlik verilmediği için riskli bir işlemdır.Bankalararası Karşılıksız Ödünç
Bankalararası Karşılıksız Ödünç Para Merkezlerinin en pahalı, en riskli ama aynı şekilde en çok kontrol altında olan işlemidir. Bundan dolayı, nadir, ve toplam miktarda ağır olmayan bir işlemdır. Bunun üzerinde, kısa süreler için kullanılır. İki yıllık Bilanço arasında, yani 31 Aralığı geçtıkten sonra, pek kullanılmaz.Bunlara rağmen, türev finansal ürünler merkezinin büyük bir bölümü bu küçük merkeze bağlıdır.""", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer, skip_prompt = True)
output = model.generate(input_ids = inputs.input_ids, attention_mask = inputs.attention_mask,
streamer = text_streamer, max_new_tokens = 256, pad_token_id = tokenizer.eos_token_id)
IBOR, Bankalararası Teklif edilen Faiz oranı ile birlikte, ilk kategoriden bir Bankanın ayni kategoriden başka bir bankaya, hiçbir karşılık garanti verilmeden, ödünç verilmesi için kullanılan faiz oranıdır ve Bankalararası Karşılıksız Ödünç para merkezlerinin en pahalı, en riskli ama aynı şekilde en çok kontrol altında olan işlemidir.
Uploaded model
- Developed by: anilguven
- License: apache-2.0
- Finetuned from model : unsloth/Qwen2.5-1.5B-bnb-4bit
This qwen2 model was trained 2x faster with Unsloth and Huggingface's TRL library.
