Downloads · 30 days
0
nordenxgt/nelm-chat-unsloth-llama3-v.0.0.1
nelm-chat-unsloth-llama3-v.0.0.1 is a machine learning model from nordenxgt. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as llama3.
This model is the initial test version, finetuned using LLaMA-3-8B version provided by UnslothAI in Nepali Language.
Downloads · 30 days
0
Access
Public
Updated Jun 27, 2024
Repo size
336 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 95%
From the Hugging Face model README
This model is the initial test version, finetuned using LLaMA-3-8B version provided by UnslothAI in Nepali Language.
Directly quantized 4bit model with bitsandbytes. Built with Meta Llama 3. By UnslothAI.
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer
model = AutoPeftModelForCausalLM.from_pretrained(
"nordenxgt/nelm-chat-unsloth-llama3-v.0.0.1"
load_in_4bit=True
)
tokenizer = AutoTokenizer.from_pretrained("nordenxgt/nelm-chat-unsloth-llama3-v.0.0.1")
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="nordenxgt/nelm-chat-unsloth-llama3-v.0.0.1",
max_seq_length=2048,
dtype=None,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
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(
"गौतम बुद्धको जन्म कुन देशमा भएको थियो?" # instruction
"", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=64, use_cache=True)
tokenizer.batch_decode(outputs)