Downloads · 30 days
13
1% of all-time downloads
afrizalha/Kancil-V1-llama3-4bit
Kancil-V1-llama3-4bit is a text generation model from afrizalha. 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.
<!DOCTYPE html <html lang="en" <head <meta charset="UTF-8" <meta name="viewport" content="width=device-width, initial-scale=1.0" <titleDocument Title</title <style h1 { font-size: 36px; color: navy; font-family: 'Taho…
Downloads · 30 days
13
1% of all-time downloads
All-time downloads
1K
Public
Parameters
8.2B
5.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
U87.2B · 87%
From the Hugging Face model README
I am ultra-overjoyed to introduce you... the 🦌 Kancil! It's a fine-tuned version of Llama 3 8B with the Tumpeng, an instruction dataset of 14.8 million words. Both the model and dataset is openly available in Huggingface.
📚 The dataset was synthetically generated from Llama 3 70B. A big problem with existing Indonesian instruction dataset is they're in reality not-very-good-translations of English datasets. Llama 3 70B can generate fluent Indonesian! (with minor caveats 😔)
🦚 This follows previous efforts for collection of open, fine-tuned Indonesian models, like Merak and Cendol. However, Kancil solely leverages synthetic data in a very creative way, which makes it a very unique contribution!
This is the second working prototype, Kancil V1. ✨ Training
✨ New features
This model was fine-tuned with QLoRA using the amazing Unsloth framework! It was built on top of unsloth/llama-3-8b-bnb-4bit and subsequently merged with the adapter.
This model is developed with research purposes for researchers or general AI hobbyists. However, it has one big application: You can have lots of fun with it!
This is a research preview model with minimal safety curation. Do not use this model for commercial or practical applications.
You are also not allowed to use this model without having fun.
As mentioned, this model was trained with Unsloth. Please use its code for better experience.
# Install dependencies. You need GPU to run this (at least T4)
%%capture
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
!pip install --no-deps xformers trl peft accelerate bitsandbytes
from unsloth import FastLanguageModel
import torch
# Available versions
KancilV1 = "catinthebag/Kancil-V1-llama3-4bit"
# Load the model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = KancilV1,
max_seq_length = 4096,
dtype = None, # Auto detect
load_in_4bit = True,
)
# This model was trained on this specific prompt template. Changing it might lead to performance degradations.
prompt_template = """<|user|>
{prompt}
<|assistant|>
{response}"""
# Start generating!
inputs = tokenizer(
[
prompt_template.format(
prompt="Bagaimana cara memberi tahu orang tua kalau saya ditolak universitas favorit saya?",
response="",)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 600, temperature=.8, use_cache = True)
print(tokenizer.batch_decode(outputs)[0].replace('\\n', '\n'))
Note: There is an issue with the dataset where the newline characters are interpreted as literal strings. Very sorry about this! 😔 Please keep the .replace() method to fix newline errors.