Downloads · 30 days
0
Someman/Indic-gemma-2b-finetuned-sft-Navarasa-adapters-ne-v1.0
Indic-gemma-2b-finetuned-sft-Navarasa-adapters-ne-v1.0 is a machine learning model from Someman. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
trained for only 700 steps, - 1.75 epochs (so the output may not be good enough to call it a good model) Here is an example to use the model:
Downloads · 30 days
0
Access
Public
Updated Mar 9, 2024
Repo size
4.4 GB
Likes
1
Public
Click a slice to open those files.
.safetensors314 MB · 94%
From the Hugging Face model README
trained for only 700 steps, -> 1.75 epochs (so the output may not be good enough to call it a good model)
Here is an example to use the model:
from transformers import StoppingCriteria, StoppingCriteriaList
from unsloth import FastLanguageModel
import torch
hf_token = "<Your-hf-token>"
max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "Someman/Indic-gemma-2b-finetuned-sft-Navarasa-adapters-ne-v1.0",
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
token=hf_token
)
FastLanguageModel.for_inference(model)
alpaca_prompt = """
### Instruction:
{}
### Input:
{}
### Response:
{}"""
inst = "LinkedIn मा कसरी बढ्ने? ५ अंकमा व्याख्या गर्नुहोस्"
input = ""
inputs = tokenizer(
[
alpaca_prompt.format(
inst, # instruction
input, # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
# since we use packing = True it starts generating another similar sample starting with <bos>. So we are using eos_token_id = tokenizer.bos_token_id
outputs = model.generate(**inputs, max_new_tokens = 800, use_cache = True)
result = tokenizer.batch_decode(outputs)[0]
print (result)
<bos>
### Instruction:
LinkedIn मा कसरी बढ्ने? ५ अंकमा व्याख्या गर्नुहोस्