Downloads · 30 days
0
0% of all-time downloads
suayptalha/Llama-3.1-8b-Turkish-Finetuned
Llama-3.1-8b-Turkish-Finetuned is a text generation model from suayptalha. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is a Turkish finetuned Llama-3.1-8B model using InstrucTurca dataset in order to increase the Turkish capability of modern LLMs.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
31
Public
Repo size
353 MB
Likes
2
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
This is a Turkish finetuned Llama-3.1-8B model using InstrucTurca dataset in order to increase the Turkish capability of modern LLMs.
Note: These are only LoRA adapters. You should also import the base model itself.
Example usage:
model_name = "unsloth/Meta-Llama-3.1-8B"
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype=torch.float16)
model.gradient_checkpointing_enable()
tokenizer = AutoTokenizer.from_pretrained(model_name)
adapter_path = "suayptalha/Llama-3.1-8b-Turkish-Finetuned"
model = PeftModel.from_pretrained(model, adapter_path)
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}"""
inputs = tokenizer(
[
alpaca_prompt.format(
"", #Your question here
"", #Given input here
"", #Output (for training)
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 512, use_cache = True)
tokenizer.batch_decode(outputs)