Instructions to use boun-tabi-LMG/TURNA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use boun-tabi-LMG/TURNA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="boun-tabi-LMG/TURNA")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("boun-tabi-LMG/TURNA") model = AutoModelForSeq2SeqLM.from_pretrained("boun-tabi-LMG/TURNA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use boun-tabi-LMG/TURNA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "boun-tabi-LMG/TURNA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "boun-tabi-LMG/TURNA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/boun-tabi-LMG/TURNA
- SGLang
How to use boun-tabi-LMG/TURNA 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 "boun-tabi-LMG/TURNA" \ --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": "boun-tabi-LMG/TURNA", "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 "boun-tabi-LMG/TURNA" \ --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": "boun-tabi-LMG/TURNA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use boun-tabi-LMG/TURNA with Docker Model Runner:
docker model run hf.co/boun-tabi-LMG/TURNA
TypeError: T5Model.forward() got an unexpected keyword argument 'token_type_ids'
#2
by atasoglu - opened
Hi,
While playing with your model using sentence-transformers, I encountered this issue. Then, as mentioned in the comment here, when I ran the model as shown below, I got the error in the output.
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("boun-tabi-LMG/TURNA")
tokenizer = AutoTokenizer.from_pretrained("boun-tabi-LMG/TURNA")
inputs = tokenizer("Merhaba dünya!", return_tensors="pt")
outputs = model(**inputs)
Output:
TypeError: T5Model.forward() got an unexpected keyword argument 'token_type_ids'
I wanted to share this with you for your information.
Also, thank you very much for your great contribution to the Turkish language model literature!
Thank you for your valuable feedback on our model! We have made changes in our models accordingly.
gokceuludogan changed discussion status to closed