Text Generation
Transformers
Safetensors
Turkish
llama
Generated from Trainer
text-generation-inference
Instructions to use r1z4x/Llama-lawbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use r1z4x/Llama-lawbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="r1z4x/Llama-lawbot")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("r1z4x/Llama-lawbot") model = AutoModelForCausalLM.from_pretrained("r1z4x/Llama-lawbot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use r1z4x/Llama-lawbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "r1z4x/Llama-lawbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "r1z4x/Llama-lawbot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/r1z4x/Llama-lawbot
- SGLang
How to use r1z4x/Llama-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 "r1z4x/Llama-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": "r1z4x/Llama-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 "r1z4x/Llama-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": "r1z4x/Llama-lawbot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use r1z4x/Llama-lawbot with Docker Model Runner:
docker model run hf.co/r1z4x/Llama-lawbot
|
Download README.md from r1z4x/Llama-lawbot: direct link, hf CLI and curl.
- Browser
- Download file 2.64 kB
-
https://huggingface.co/r1z4x/Llama-lawbot/resolve/main/README.md
- Command line
-
hf download hf://r1z4x/Llama-lawbot/README.md
-
curl -L -o README.md https://huggingface.co/r1z4x/Llama-lawbot/resolve/main/README.md
2.64 kB
metadata
library_name: transformers
license: llama3.2
base_model: meta-llama/Llama-3.2-3B-Instruct
tags:
- generated_from_trainer
model-index:
- name: results
results: []
datasets:
- Renicames/turkish-law-chatbot
language:
- tr
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