Package: fedem
Projcect SeshuSLMs by the public, for the publicIntroductionchatGPT caught the public imagination and for the first time non-tech people could experience Generative AI. This led to a surge in interest to develop safe applications of LLMs as well as developing domain specific or open source alternatives to chatGPT. Notable among them is LLaMA 2 - an LLM open sourced by Meta. This release catalyzed the development of tasks, tools, and assets ranging from datasets to new models to new applictions. An SLM called Phi 2 released by Microsoft also showed that small models (reletively that is) can also compete with large models, which can be trained and served at substantially lower costs. However, there are some challenges.Majority, if not all the LLMs, we see today are based on proven Transformer based architectures. And Transfomres have quadratic (in inputs tokens) complexity - therefore slow to train and infer. As a result, new memory and compute efficient attention mechanisms have sprungup, along with Engineering hacks. But, at the end of the day, they are still based on Transformer-based architectures.Further, majority, with the exception of some Chinese LLMs, are English-centric and other languages have a token representation (no pun intended).
Often, LLMs have a particulalr tokenizer -- which makes extension to other languages/ domains hard. Vocabulary size and Transfomers Computational Efficiency have an uneasy relationship.
Developing SLMs or LLMs is still a compute heavy problem. Therefore, only large consortia with deep pockets, massive talent concentration and GPU farms can afford to build such models.In this hackathon, we like to address the above challenges.Proposal:ObjectivesDevelop a multilingual Mambaa(S4)-based SLM on multi-lingual indic datasetDecentralise the training and development of SLMs/LLMs via simple federated learning framework w.r.t cost, talent and compute.Provide an experimental platform to develop the skills to develop SLMs/LLMs, particulalry for the student community, and foster research & innovationUser StoriesClient (donor user)Pre-reqshas GPU, registers on HuggingFace/mlsquare for write accessfamilair with HuggingFace ecosystem (transfomers, peft, datasets, hub)[optional] can donate time or data or bothActions:Runs client side sscript whichdownloads data, pretrains modelSFTs via LoRApushes the adapter to HuggingFace model hubServer (who manages the federated learning)Pre-reqshas (big) GPU(s)is familair with HuggingFace ecosystem (transfomers, peft, datasets, hub), databases, ML Enginneering in general[optional] can donate time or data or bothActions:Pretrains a multi-lingual Mamba model, publushes a checkpointEvaluated the community contributed adapters in a single-blind fashion, and merges them into the pretrained modelDoes continous pretrainning, and releases checkpoints periodicallyAcademic Interestsexperiment and identity good federating learning policiesfigure out effective training configurations to PT, CPT, SFT, FedT SLMs and LLMsdevelop new task specific adapterscontribute your local, vernacular datacurate datasetsRoadmapWeek 0Make Mamba compatiable with Transformer classTest LoRA adapters (adding, training, merging)Pretrain an SLM, SFT on LoRA, Merge, Push
Outcome: A working end-to-end Pretraining and SFT-ing pipelineWeek 1Develop client-side codeOn multi-lingual indic dataset such assamantar, pretrain a modelRelease a checkpointWeek 2Drive SFT via community (at least two users)Run Federated SFT-ingWeek 4 and onwardsBenchmark and eval on test set (against other OSS LLMS)Perplexity vs Epochs (and how Seshu is maturing)References:Architectures and TokenizersMamba: Linear-Time Sequence Modeling with Selective State Spaces,paper,  1st, Dec, 2023MambaByte: Token-free Selective State Space Modelpaper, 24th, Jan, 2024BlackMamba -  Mixture of Experts of State Space Modelspaper,codeByT5: Towards a token-free future with pre-trained byte-to-byte modelspaper, 28th, May, 2023Indic LLMsRomanSetu: Efficiently unlocking multilingual capabilities of Large Language Models models via Romanizationpaper, 25th, Jan, 2024Open Hathi -blogfrom sarvam.ai, 12th Dec, 2023MaLA-500: Massive Language Adaptation of Large Language ModelspaperModel MergingModel soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timepaperEditing Models with Task ArithmeticpaperTIES-Merging: Resolving Interference When Merging ModelspaperLanguage Models are Super Mario: Absorbing Abilities from Homologous Models as a Free LunchpaperRethinking Alignment via In-Context Learning (implments token distribution shift)blogPhatGoose: The Challenge of Recycling PEFT Modules for Zero-Shot GeneralizationblogLoRA Hub: Efficient Cross-Task Generalization via Dynamic LoRA Composition (https://arxiv.org/abs/2307.13269)DatasetssamantarhereCode & Tools for Models, and Distributed TrainingMamba-HF: Mamba model compatible with HuggingFace transformershereMamba pretrained model collectionhereMamba-minimal: a minimal implementaiton of Mamba architecturehereMamba: original implementation by Mama authorshereOLMo: A truly open LLMblogPetals: decentralized inference and finetuning of large language modelsblog,paper,git repoposition blog on Petals: a shift in training LLMs with Petals networktechcrunch blogShepherd: A Platform Supporting Federated Instruction TuninghereFATE-LM is a framework to support federated learning for large language models(LLMs)hereFEDML Open Source: A Unified and Scalable Machine Learning Library for Running Training and Deployment Anywhere at Any Scaleheremergekit for model merign to implement multiple model merging techiqueshereNote:The views expressed or approach being taken - is of the individuals, and they do not represent any organization explicitly or implicitly.
Likewise, anyone who wants to contribute their time, compute or data must understand that, this is a community experiment to develop LLMs by the community, and may not result in any significant outcome. On the contrary, this may end up in total failure. The contributors must take this risk on their own.