Edit model card

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

BB-L-01-7B

By bhaiyabot ai

This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 on the HuggingFaceH4/ultrachat_200k and the rohansolo/BB_HindiHinglish datasets.

Model description

The goal was to test fine-tuning using biilingual datasets and techniques, to see if bilingual capabilities can be added while improving performance.

Model performs really well in Hindi, but can be mediocre at best in Hinglish, which we're attributing to translation quality.

Dataset Comprised of:

Ultrachat 200k (English only)

Hindi and Hinglish translations of Alpaca

Hindi tanslations of evol-instruct

Training took 8 hours on 8 Nvidia A100 SXMs using Deepspeed

Evaluation:

Note - Scores for BB-L-01-7B were created using EluetherAI's lm eval tool, currently awaiting results from open-llm to ensure independent results. All other model results are from Openllm leaderboard

Model Average ARC HellaSwag MMLU TruthfulQA Winogrande GSM8K
BB-L-01-7B 59.59 59.90 82.21 60.21 43.17 73.40 38.67
Mistral-7b-v0.1 60.97 59.98 83.31 64.16 42.15 78.37 37.83
OpenHathi-7B-Hi-v0.1-Base 46.64 49.49 74.34 41.38 37.46 71.27 5.91
Llama-2-7b-hf 50.97 53.07 78.59 46.87 38.76 74.03 14.48
Mistral-7B-Instruct-v0.1 54.96 54.52 75.63 55.38 56.28 73.72 14.25

Usage:

import torch
from transformers import pipeline

pipe = pipeline("text-generation", model="rohansolo/BB-L-01-7B", torch_dtype=torch.bfloat16, device_map="auto",token=<your_hf_token>)

input= "भाई ये आर्टिफीसियल इंटेलिजेंस क्या है?"
messages = [
    {
        "role": "system",
        "content": "You are a helpful assistant that thinks step by step",
    },
    {"role": "user", "content": f"{input}"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(prompt, max_new_tokens=1024,temperature=0.0)
print(outputs[0]["generated_text"])

Sample Outputs:

<|system|>
You are a helpful assistant that thinks step by step</s>
<|user|>
भाई ये आर्टिफीसियल इंटेलिजेंस क्या है?</s>
<|assistant|>
आर्टिफिशियल इंटेलिजेंस (AI) एक कंप्यूटर सिस्टम का एक श्रेणी है जो मानव बुद्धिमत्ता की तरह काम कर सकता है। यह मशीनों को सीखने, समस्याओं को हल करने और निर्णय लेने की क्षमता प्रदान करता है। यह विभिन्न क्षेत्रों में उपयोग किया जाता है, जैसे कि स्वास्थ्य सेवा, वित्त, विज्ञान और विनिर्माण। आर्टिफिशियल इंटेलिजेंस का उपयोग करके हम अपनी जिम्मेदारियों को स्वचालित कर सकते हैं और अपनी कार्यक्षमता को बढ़ा सकते हैं।
<|system|>
You are a helpful assistant that thinks step by step</s>
<|user|>
एक पाइथन स्क्रिप्ट लिखो बबल सॉर्ट के लिए</s>
<|assistant|>
यहाँ एक पाइथन स्क्रिप्ट है जो बबल सॉर्ट एल्गोरिथ्म का उपयोग करता है:

python
def bubble_sort(arr):
    n = len(arr)
    for i in range(n):
        for j in range(0, n-i-1):
            if arr[j] > arr[j+1] :
                arr[j], arr[j+1] = arr[j+1], arr[j]
    return arr

# उदाहरण उपयोग
arr = [64, 34, 25, 12, 22, 11, 90]
print("सॉर्ट किए गए एरे: ", bubble_sort(arr))


इस स्क्रिप्ट में, हमने `bubble_sort` नामक एक फ़ंक्शन बनाया है जो एक सॉर्ट किए गए एरे को लेता है और उसे बबल सॉर्ट एल्गोरिथ्म का उपयोग करके सॉर्ट करता है। फ़ंक्शन के भीतर, हमने एक लूप बनाया है जो एरे के प्रत्येक तत्व को सॉर्ट करता है। हमने एक और लूप का उपयोग किया है जो एरे के प्रत्येक तत्व को सॉर्ट करता है। यदि एक तत्व अपने पिछले तत्व से बड़ा होता है, तो हम उन्हें स्वैप करते हैं। फ़ंक्शन के बाद, हम सॉर्ट किए गए एरे को प्रिंट करते हैं।

आप इस स्क्रिप्ट को अपनी आवश्यकताओं के अनुसार संशोधित कर सकते हैं।
<|system|>
Translate the following into hindi</s>
<|user|>
My name is Rohan</s>
<|assistant|>
मेरा नाम रोहन है।

<|system|>
You are a helpful assistant that thinks step by step</s>
<|user|>
ek tweet likh do india ke AI success ke liye</s>
<|assistant|>
AI ke vikas men india ke lie ek bari avasar hai, jisamen vibhinn udyogon men nee naukariyon ke vikas aur svasthy sevaon men sudhar hoga. #AI #India #Tech #Innovation. 

Intended uses & limitations

This model is not intended for production deployment.

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 32
  • eval_batch_size: 16
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 8
  • gradient_accumulation_steps: 2
  • total_train_batch_size: 512
  • total_eval_batch_size: 128
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • num_epochs: 1

Training results

Training Loss Epoch Step Validation Loss
0.8627 1.00 387 0.8193

Framework versions

  • Transformers 4.35.0
  • Pytorch 2.1.0+cu118
  • Datasets 2.14.6
  • Tokenizers 0.14.1

@misc{alignment_handbook2023, author = {Lewis Tunstall and Edward Beeching and Nathan Lambert and Nazneen Rajani and Alexander M. Rush and Thomas Wolf}, title = {The Alignment Handbook}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/huggingface/alignment-handbook}} }

@misc{jiang2023mistral, title={Mistral 7B}, author={Albert Q. Jiang and Alexandre Sablayrolles and Arthur Mensch and Chris Bamford and Devendra Singh Chaplot and Diego de las Casas and Florian Bressand and Gianna Lengyel and Guillaume Lample and Lucile Saulnier and Lélio Renard Lavaud and Marie-Anne Lachaux and Pierre Stock and Teven Le Scao and Thibaut Lavril and Thomas Wang and Timothée Lacroix and William El Sayed}, year={2023}, eprint={2310.06825}, archivePrefix={arXiv}, primaryClass={cs.CL} }

Downloads last month
2
Safetensors
Model size
7.24B params
Tensor type
BF16
·

Finetuned from

Datasets used to train rohansolo/BB-L-01-7B