CTO | CDO Gen AI | GPU Cloud Engineering | PhD, MBA, MS

Frisco, TX
Joined November 2008
Qwen-14B (Alibaba) The most powerful open-source model for it's size. And the longest trained: 3T tokens. Comes in 5 different versions: Base, Chat, Code, Math and Vision. (And is even trained for tool usage!) Opinion: You should consider it as your new "go-to". --- Paper: qianwen-res.oss-cn-beijing.a… Qwen-14B: huggingface.co/Qwen/Qwen-14B Qwen-14B-Chat: huggingface.co/Qwen/Qwen-14B… Qwen-VL-Chat: huggingface.co/Qwen/Qwen-VL-… --- --- Implementation Several details caught my eye while reading it's paper. These might be interesting for anyone involved with training models at this scale. --- Tokenizer Like many other multilingual LLMs, they had to add language specific tokens to their tokenizer. - Used GPT-4's tokenizer (CL100k) - Spllited numbers into single digits. - Added Chinese common words. - The final tokenizer has a vocab of 152K. - Result: The compressive rate of this model is better than all the competing models. --- Pretraining Used a diverse set that covers a wide range of topics from various sources, including: Web documents, encyclopedia, books, codes, etc. - The actual sources are not listed. - They do mention that they extract text from HTML pages and use language identification tools to determine the language. (Hinting: Mass scraping) Deduplication methods: - Exact-match. - MinHash. - LSH. Filtering methods: 1. Rule based. 2. ML based: - ML models train to estimate: Text-quality (scoring), Identify inappropriate content. By hand: - They manually sample texts from various sources, review them by hand to ensure high quality. - They selectively up-sampled specific datasets coming from certain sources. Hyperparameters: - AdamW: betas = (0.9, 0.95), eps = 1e-8, cosine scheduler, min_lr = 10% of max_lr (Aggressive choice!), BF16. --- Supervised Fine-Tuning As said, they further fine-tune the base model for specific domains. In the process, they use: - Self-instruct for generating synthetic high quality data. - For evaluation, they tested for code excitability (Running the generated code). - There is also a usage example demonstrating the ability to "Auto Comment" a code snippet, on this topic: In my own opinion, this is one of the "secrets" of ChatGPT: Generating comments BEFORE each line of code and use the commented code as a training data. You can easily see that all the code ChatGPT generates follow this structure and it is obvious why this type of format boosts coding performance. --- Architecture Tweaks RoPE: Like everyone, they use RoPE (One of the best options today) but they are using FP32 precision for the inverse frequency matrix, rather than BF16 or FP16. > Noted. [1] RoPE is (VERY) powerful: blog.eleuther.ai/rotary-embe… Bias: Again like everyone, they removed all biases [1] nearly everywhere BUT they added biases for the QKV layers [2]. [1] Bias removal improves performance: arxiv.org/abs/2204.02311 [2] RoPE + Bias extrapolation study: spaces.ac.cn/archives/9577 Normalization: RMSNorm. Pre-Norm. Nothing new under the sun but they do hint that better methods exist today other than pre-norm and will be experimented with in the future. They might be hinting at this: github.com/ZixuanJiang/pre-r… (?) --- Context window length - Using dynamic NTK-aware interpolation during inference. [1] - Specifically, they used YARN's version: dynamic interpolation version that changes the scale by chunks. [2] - Interesting observation: Long-context modeling ability varies across layers - Lower layers being more sensitive in context length extension compared to the higher layers. To leverage this: They shorter windows for lower layers and longer windows for higher layers. [1] Dynamic NTK: reddit.com/r/LocalLLaMA/comm… [2] YARN: arxiv.org/abs/2306.15595 --- Synthetic Data Generation Self-instruct: They used the few-shot capabilities of the model to generate data [1], But they do this in an iterative way: At each generation step, they manually remove noisy samples and retrain the model. Doing this process multiple times resulted in a much more reliable model for fewshot generation. [2] [1] - Giving it couple of examples and let it "complete" the text to generate more. [2] - This is probably because of the main issue with synthetic data: Filtering. If you do not filter the data well enough you amplify the noise and not just the signal. --- RLHF The paper also detail heavily the process of RLHF training. This is less of an interest of myself at the moment but I highly suggest reading it if you are interested. --- Summary These models are unbelievably powerful and probably should be used as your new "go-to" models. (For at least code and math..) Amazing work!
22
198
12
888
190,007
I can't believe I've just fine-tuned a 33B-parameter LLM on Google Colab in a few hours.😱 Insane announcement for any of you using open-source LLMs on normal GPUs! 🤯 A new paper has been released, QLoRA, which is nothing short of game-changing for the ability to train and fine-tune LLMs on consumers' GPUs. In a few words: QLoRA reduces the memory usage of LLM fine-tuning without any performance tradeoffs compared to standard 16-bit model fine-tuning. This method enables 33B model fine-tuning on a single 24GB GPU and 65B model fine-tuning on a single 46GB GPU. This is incredible! 😍 More specifically, QLoRA uses 4-bit quantization to compress a pre-trained language model. The LM parameters are then frozen, and a relatively small number of trainable parameters are added to the model in the form of Low-Rank Adapters. During finetuning, QLoRA backpropagates gradients through the frozen 4-bit quantized pretrained language model into the Low-Rank Adapters. The LoRA layers are the only parameters being updated during training. Read more about LoRA in the original LoRA paper (arxiv.org/abs/2106.09685). 🤓 QLoRA has one storage data type (usually 4-bit NormalFloat) for the base model weights and a computation data type (16-bit BrainFloat) used to perform computations. QLoRA dequantizes weights from the storage data type to the computation data type to perform the forward and backward passes, but only computes weight gradients for the LoRA parameters, which use 16-bit bfloat. The weights are decompressed only when they are needed, therefore the memory usage stays low during training and inference. Beautiful!😱 QLoRA tuning is shown to match 16-bit finetuning methods in a wide range of experiments. In addition, the Guanaco models, which use QLoRA finetuning for LLaMA models on the OpenAssistant dataset (OASST1), are state-of-the-art chatbot systems and are close to ChatGPT on the Vicuna benchmark. This is an additional demonstration of the power of QLoRA tuning. Their Guanaco models are reaching 99.3% of the performance level of ChatGPT while only requiring 24 hours of fine-tuning on a single GPU. You can actually do it in Google Colab. 📚 Links- QLoRA Paper - arxiv.org/pdf/2305.14314.pdf Colab for inference - colab.research.google.com/dr… Colab for fine-tuning - colab.research.google.com/dr… GitHub Repository- github.com/artidoro/qlora Use it with HuggingFace - huggingface.co/blog/4bit-tra…
105
926
116
4,722
1,786,289
Science has literally altered the trajectory of my life. It has created purpose for me in addition to saving my life as a child. Yesterday was National #ScienceAppreciationDay. I urge you to share how science has helped you or another. Tag @ScienceSavesOrg or use #ScienceSaves.
129
136
15
1,500
155,472
REMEMBER THIS DAY. NUCLEAR FUSION BREAKTHROUGH. We have harnessed the power to create nuclear fusion with lasers eliminating the need for fossil fuels, and without any radioactive waste. This breakthrough creates unlimited clean renewable energy. It eliminates the need for oil. – at Manhattan, NY
3,628
16,108
2,419
110,449
Integrating Security with DevOps on Oracle #Cloud – oracl.info/nu4O50wK0fo via @OracleIaaS @docbasu #Oracle
5
1
12
sbasu777 retweeted
A little bit of mathematics never hurt. The art is to provide just in time on-demand the underlying platform for these computationally intensive models. lnkd.in/ePspcnw
The problem with the abortion issue is that instead of thinking of it as a problem to be solved it has been turned into a moral issue on which to choose sides, signal one's tribal commitment, moralize about one's position & demonize the other side as evil. Solutions not positions – at Santa Barbara, CA
71
113
5
635
sbasu777 retweeted
Introducing: GraalVM Enterprise Edition. A virtual machine ideal for #cloud and #hybrid environments. Start services up to 100X faster and reduce memory usage up to 5X by compiling programs and rearranging #code. See for yourself here: ora.cl/rW0jI
1
52
5
110
The expo hall is opening at #StrataData in London. Come by the ⁦@OracleIaaS⁩ booth to learn about Oracle’s work in big data and see ⁦@h2oai⁩, ⁦@cloudera⁩ and ⁦@DataStax⁩ running on #OCI!
4
8
Copying Object Storage data from one #cloud tenancy to another requires some extra #IAM policies. @docbasu explains how to create them: ora.cl/4wE8O
2
4
Driving in San Francisco this week: |🚘 || | 🌁|🚘 || | _____________________ |🚍 || | |         | |🚔 || | | #SFGOpeningDay | 🏙|🚘 || | | is Friday! | 🏙|🚖 || | |————————-|
1
19
2
163
RT @OracleIaaS Here's a nifty checklist to secure a #cloud application by @docbasu ora.cl/Vo6w1 https://xitter.cf/t.co/zcm1vlhtlx #engineering #developer
1
1
"To provide data availability and durability, Oracle #Cloud Infrastructure enables customers to select from infrastructure with distinct geographic and threat profiles." @docbasu ora.cl/Eb5Gr
6
6
sbasu777 retweeted
NIST selected 26 out of the original 69 submitted post-quantum cryptographic algorithms that are supposed to resist attacks from future quantum computers #nist #quantumcomputing lnkd.in/dPFRdXz
1
1
sbasu777 retweeted
Cloud Computing Workshop at The Research Club, UT Dallas on Feb 7th. I will sharing Security and Cloud Native services of #OracleIaaS lnkd.in/eeHtigD
1
1
sbasu777 retweeted
#OracleIaaS services are covered by PCI DSS AoC Still the customers requires to configure the security controls as part of shared responsibility for their overall compliance. @OracleIaaS @docbasu Here is a general guidance lnkd.in/enWNnh9
1
1
Part 1 of 4 - Oracle #IaaS and Seven Pillars of Trusted Enterprise Cloud Platform: How Oracle #Cloud Infrastructure #security services provide trusted customer isolation and data encryption by @docbasu: ora.cl/Ri6aw
8
5
A clear cheecklist around #security when migrating an application to the #Cloud by @docbasu #Oracle blogs.oracle.com/cloud-infra…
Part 2of 4 - Oracle #IaaS and Seven Pillars of Trusted #Enterprise #Cloud Platform: How to obtain the #security controls and visibility needed for your cloud environment by @docbasu. ora.cl/qH5BZ
4
4