How to use from
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 "umarigan/LLama-3-8B-Instruction-tr" \
    --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": "umarigan/LLama-3-8B-Instruction-tr",
		"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 "umarigan/LLama-3-8B-Instruction-tr" \
        --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": "umarigan/LLama-3-8B-Instruction-tr",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Uploaded model

  • Developed by: umarigan
  • License: apache-2.0
  • Finetuned from model : unsloth/llama-3-8b-bnb-4bit

This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.

Usage Examples


# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("umarigan/LLama-3-8B-Instruction-tr")
model = AutoModelForCausalLM.from_pretrained("umarigan/LLama-3-8B-Instruction-tr")
alpaca_prompt = """
Görev:
{}

Girdi:
{}

Cevap:
{}"""

inputs = tokenizer(
[
    alpaca_prompt.format(
        "bir haftada 3 kilo verebileceğim 5 öneri sunabilir misin?", # Görev
        "", # Girdi
        "", # Cevap - boş bırakın!
    )
], return_tensors = "pt")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
tokenizer.batch_decode(outputs)

Output:
<|begin_of_text|> Görev: bir haftada 3 kilo verebileceğim 5 öneri sunabilir misin?

Girdi:

Cevap:

1. Yemeklerinizde daha az tuz kullanın. 2. Daha fazla sebze ve meyve tüketin. 3. Daha fazla su için. 4. Daha fazla egzersiz yapın. 5. Daha fazla uyku alın.<|end_of_text|>
Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for umarigan/LLama-3-8B-Instruction-tr

Finetuned
(3118)
this model

Dataset used to train umarigan/LLama-3-8B-Instruction-tr

Spaces using umarigan/LLama-3-8B-Instruction-tr 8

Collection including umarigan/LLama-3-8B-Instruction-tr