Instructions to use RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits") model = AutoModelForCausalLM.from_pretrained("RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits
- SGLang
How to use RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits 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 "RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits" \ --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": "RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits", "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 "RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits" \ --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": "RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits with Docker Model Runner:
docker model run hf.co/RichardErkhov/mukayese_-_transformer-turkish-summarization-8bits
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Quantization made by Richard Erkhov.
transformer-turkish-summarization - bnb 8bits
- Model creator: https://huggingface.co/mukayese/
- Original model: https://huggingface.co/mukayese/transformer-turkish-summarization/
Original model description:
datasets: - mlsum metrics: - rouge model-index: - name: mukayese/transformer-turkish-summarization results: - task: name: Summarization type: summarization dataset: name: mlsum tu type: mlsum args: tu metrics: - name: Rouge1 type: rouge value: 43.2049 license: mit language: - tr pipeline_tag: summarization
Mukayese: Turkish NLP Strikes Back
Summarization: mukayese/transformer-turkish-summarization
This model is uncased, it was initialized from scratch and trained only the mlsum/tu dataset with no pre-training.
It achieves the following results on the evaluation set:
- Rouge1: 43.2049
- Rouge2: 30.7082
- Rougel: 38.1981
- Rougelsum: 39.9453
Check this paper for more details on the model and the dataset.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 4
- eval_batch_size: 8
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 2
- total_train_batch_size: 64
- total_eval_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 15.0
- mixed_precision_training: Native AMP
- label_smoothing_factor: 0.1
Framework versions
- Transformers 4.11.3
- Pytorch 1.8.2+cu111
- Datasets 1.14.0
- Tokenizers 0.10.3
Citation
@misc{safaya-etal-2022-mukayese,
title={Mukayese: Turkish NLP Strikes Back},
author={Ali Safaya and Emirhan Kurtuluş and Arda Göktoğan and Deniz Yuret},
year={2022},
eprint={2203.01215},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 8