Downloads · 30 days
106
0% of all-time downloads
Trendyol/Llama-3-Trendyol-LLM-8b-chat-v2.0
Llama-3-Trendyol-LLM-8b-chat-v2.0 is a text generation model from Trendyol. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.
Trendyol LLM v2.0 is a generative model based on Trendyol LLM base v2.0 (continued pretraining version of Llama-3 8B on 13 billion tokens) model. This is the repository for the chat model.
Downloads · 30 days
106
0% of all-time downloads
All-time downloads
51.2K
Public
Parameters
8B
16.1 GB on disk
Likes
33
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
Trendyol LLM v2.0 is a generative model based on Trendyol LLM base v2.0 (continued pretraining version of Llama-3 8B on 13 billion tokens) model. This is the repository for the chat model.
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
import torch
model_id = "Trendyol/Trendyol-LLM-8b-chat-v2.0"
pipe = pipeline(
"text-generation",
model=model_id,
model_kwargs={
"torch_dtype": torch.bfloat16,
"use_cache":True,
"use_flash_attention_2": True
},
device_map='auto',
)
terminators = [
pipe.tokenizer.eos_token_id,
pipe.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
sampling_params = dict(do_sample=True, temperature=0.3, top_k=50, top_p=0.9, repetition_penalty=1.1)
DEFAULT_SYSTEM_PROMPT = "Sen yardımsever bir asistansın ve sana verilen talimatlar doğrultusunda en iyi cevabı üretmeye çalışacaksın."
messages = [
{"role": "system", "content": DEFAULT_SYSTEM_PROMPT},
{"role": "user", "content": "Türkiye'de kaç il var?"}
]
outputs = pipe(
messages,
max_new_tokens=1024,
eos_token_id=terminators,
return_full_text=False,
**sampling_params
)
print(outputs[0]["generated_text"])