Renicames/turkish-law-chatbot
Viewer • Updated • 14.9k • 209 • 31
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") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("r1z4x/Llama-lawbot")
model = AutoModelForCausalLM.from_pretrained("r1z4x/Llama-lawbot")How to use r1z4x/Llama-lawbot with vLLM:
# 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
}'docker model run hf.co/r1z4x/Llama-lawbot
How to use r1z4x/Llama-lawbot with SGLang:
# 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
}'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
}'How to use r1z4x/Llama-lawbot with Docker Model Runner:
docker model run hf.co/r1z4x/Llama-lawbot
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.
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.
The following hyperparameters were used during training:
Base model
meta-llama/Llama-3.2-3B-Instruct