Instructions to use asafaya/kanarya-750m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use asafaya/kanarya-750m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="asafaya/kanarya-750m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("asafaya/kanarya-750m") model = AutoModelForCausalLM.from_pretrained("asafaya/kanarya-750m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use asafaya/kanarya-750m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "asafaya/kanarya-750m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asafaya/kanarya-750m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/asafaya/kanarya-750m
- SGLang
How to use asafaya/kanarya-750m 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 "asafaya/kanarya-750m" \ --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": "asafaya/kanarya-750m", "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 "asafaya/kanarya-750m" \ --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": "asafaya/kanarya-750m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use asafaya/kanarya-750m with Docker Model Runner:
docker model run hf.co/asafaya/kanarya-750m
Kanarya-750M: Turkish Language Model
Kanarya is a pre-trained Turkish GPT-J 750M model. Released as part of Turkish Data Depository efforts, the Kanarya family has two versions (Kanarya-2B, Kanarya-0.7B). Kanarya-2B is the larger version and Kanarya-0.7B is the smaller version. Both models are trained on a large-scale Turkish text corpus, filtered from OSCAR and mC4 datasets. The training data is collected from various sources, including news, articles, and websites, to create a diverse and high-quality dataset. The models are trained using a JAX/Flax implementation of the GPT-J architecture. The models are only pre-trained and are intended to be fine-tuned on a wide range of Turkish NLP tasks.
Model Details
- Model Name: Kanarya-750M
- Model Size: 750M parameters
- Training Data: OSCAR, mC4
- Language: Turkish
- Layers: 12
- Hidden Size: 2048
- Number of Heads: 16
- Context Size: 2048
- Positional Embeddings: Rotary
- Vocabulary Size: 32,768
Intended Use
This model is only pre-trained on Turkish text data and is intended to be fine-tuned on a wide range of Turkish NLP tasks. The model can be used for various Turkish NLP tasks, including text generation, translation, summarization, and other Turkish NLP tasks. This model is not intended to be used for any downstream tasks without fine-tuning.
Limitations and Ethical Considerations
The model is trained on a diverse and high-quality Turkish text corpus, but it may still generate toxic, biased, or unethical content. It is highly recommended to use the model responsibly and make sure that the generated content is appropriate for the use case. Please use the model responsibly and report any issues.
License: Apache 2.0
The model is licensed under the Apache 2.0 License. It is free to use for any purpose, including commercial use. We encourage users to contribute to the model and report any issues. However, the model is provided "as is" without warranty of any kind.
Citation
If you use the model, please cite the following paper:
@inproceedings{safaya-etal-2022-mukayese,
title = "Mukayese: {T}urkish {NLP} Strikes Back",
author = "Safaya, Ali and
Kurtulu{\c{s}}, Emirhan and
Goktogan, Arda and
Yuret, Deniz",
editor = "Muresan, Smaranda and
Nakov, Preslav and
Villavicencio, Aline",
booktitle = "Findings of the Association for Computational Linguistics: ACL 2022",
month = may,
year = "2022",
address = "Dublin, Ireland",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.findings-acl.69",
doi = "10.18653/v1/2022.findings-acl.69",
pages = "846--863",
}
Acknowledgments
During this work, Ali Safaya was supported by KUIS AI Center fellowship. Moreover, the pre-training of these models were performed at TUBITAK ULAKBIM, High Performance and Grid Computing Center (TRUBA resources).
- Downloads last month
- 783