Instructions to use JuLsez4R/Llama-turkish-lawbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JuLsez4R/Llama-turkish-lawbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JuLsez4R/Llama-turkish-lawbot")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JuLsez4R/Llama-turkish-lawbot") model = AutoModelForCausalLM.from_pretrained("JuLsez4R/Llama-turkish-lawbot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JuLsez4R/Llama-turkish-lawbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JuLsez4R/Llama-turkish-lawbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JuLsez4R/Llama-turkish-lawbot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JuLsez4R/Llama-turkish-lawbot
- SGLang
How to use JuLsez4R/Llama-turkish-lawbot 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 "JuLsez4R/Llama-turkish-lawbot" \ --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": "JuLsez4R/Llama-turkish-lawbot", "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 "JuLsez4R/Llama-turkish-lawbot" \ --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": "JuLsez4R/Llama-turkish-lawbot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JuLsez4R/Llama-turkish-lawbot with Docker Model Runner:
docker model run hf.co/JuLsez4R/Llama-turkish-lawbot
results
This model is a fine-tuned version of meta-llama/Llama-3.2-3B-Instruct on Renicames/turkish-law-chatbot dataset, designed to generate responses based on Turkish legal questions and answers.
Model description
This model is fine-tuned to imporove its ability to generate responses for a Turkish law chatbot. meta-llama/Llama-3.2-3B-Instruct was used as the base model, which can pretty much handle various tasks. Just specialized it with the dataset of Renicames/turkish-law-chatbot.
Intended uses & limitations
Intended uses
- This model can be deployed in applications aimed at providing legal information or answering legal questions in Turkish.
- Useful for generating legal text, such as explanations of laws or providing examples of legal processes in Turkish.
Limitaions
- While the model has been fine-tuned on the Turkish legal domain, it may still lack the depth and specificity required for complex legal inquiries. It might not be suitable for professional legal advice.
- As with any AI model, it may reflect biases found in the training data, so it should be used with caution in critical applications.
- This model is focused on the Turkish language, so it may not perform well in other languages or mixed-language queries.
Training and evaluation data
Training data details:
- Source: Renicames/turkish-law-chatbot dataset
- Languages: Turkish
- Content: Legal questions and answers
- Size: The dataset consists of several thousand question-answer pairs related to Turkish law.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
Framework versions
- Transformers 4.47.0
- Pytorch 2.5.1+cu121
- Datasets 3.3.1
- Tokenizers 0.21.0
- Downloads last month
- 19
Model tree for JuLsez4R/Llama-turkish-lawbot
Base model
meta-llama/Llama-3.2-3B-Instruct