Zephyr-7B : HuggingFace’s Hyper-Optimized LLM Built on Top of Mistral 7B

Zypher 7B

Introduction

The evolution of open large language models (LLMs) has significantly impacted the AI research community, particularly in developing chatbots and similar applications. Following the release of models like LLaMA, there's been a surge in research on efficient fine-tuning, extended prompt handling, retrieval augmented generation (RAG), and quantization.

The LLaMA model, for instance, marked a new era in fine-tuning and prompt contextualization, paving the way for subsequent models like MosaicML’s MPT, Together AI’s RedPajama-INCITE, TII’s Falcon, and Meta’s Llama 2. Each of these models contributes unique capabilities, enhancing the overall functionality and scope of LLMs.

Mistral AI, a startup from Paris and founded by former Google DeepMind and Meta employees, has made a name for itself with its first offering: Mistral 7B.

Mistral 7B's edge lies in its efficiency, delivering similar or enhanced capabilities compared to peers like Llama 2 but with less computational demand.

Specifically tuned for instructional tasks, Mistral 7B Instruct shines on platforms like Hugging Face, where it surpasses other models of the same size and competes closely with those having nearly double its parameters.

Building on this, Hugging Face introduced Zephyr 7B Alpha, showcasing that a fine-tuned Mistral 7B can indeed surpass the abilities of significantly larger chat models and, in some tasks, even rival GPT-4. The “Alpha” was just the beginning, as Zephyr 7B Beta followed shortly.

This article will explore how Zephyr 7B leverages the power of larger models to refine its ability to respond and align with human instruction, a process made possible through the technique of knowledge distillation. This method involves training smaller models on the complex patterns learned by larger ones, reducing training demands without sacrificing language modeling capabilities. We'll delve into the specifics of Hugging Face's knowledge distillation approach.

Knowledge distillation

A key innovation in developing models like Zephyr-7B is distilled supervised fine-tuning (dSFT). This method involves using the output from a larger, more capable ‘teacher' model to train a smaller ‘student' model, enhancing its accuracy. While distillation improves open models on various tasks, a gap in performance compared to teacher models still exists.

Knowledge distillation is a method in machine learning where a compact model, referred to as the “student,” is taught to replicate the performance of a larger, more complex “teacher” model. This technique enables the student to perform tasks that were previously beyond its capacity by transferring the intricate patterns learned by the teacher.

Knowledge Distillation,| Teacher-Student Model

Knowledge Distillation | Teacher-Student Model

The student model trains on the output probabilities or features generated by the teacher model, focusing on matching these outputs rather than just the final predictions. This allows the student to learn the nuanced decision-making processes of the teacher, often resulting in improved performance over training with only the ground truth data.

Historically, knowledge distillation has been utilized in models like Hinton's original distillation networks, and more recently in NLP with models such as DistilBERT, which distilled the BERT model into a smaller, faster version that retains most of the original's language understanding capabilities. Another example is TinyBERT, which goes further in optimizing the size and speed for mobile or edge devices.

In the case of Zephyr-7B, knowledge distillation is used to imbue a smaller 7B parameter model with the capabilities of its larger counterparts. By doing so, Zephyr-7B achieves a balance between performance and efficiency, making it suitable for environments where computational resources are limited, without sacrificing the quality of interaction and understanding.

In developing Zephyr-7B, researchers tackled the challenge of aligning a small open LLM entirely through distillation. They introduced an approach called distilled direct preference optimization (dDPO), which uses AI Feedback from an ensemble of teacher models as preference data. This method, requiring no human annotation, significantly reduces the time and resources needed for model training.

Constructing ZEPHYR-7B

To validate dDPO, researchers constructed ZEPHYR-7B, an aligned version of the Mistral-7B model. The process involved three steps:

  1. dSFT using the UltraChat dataset:Distilled Supervised Fine-Tuning (dSFT) is an advanced method to train large language models (LLMs) by leveraging the output of larger, more capable “teacher” models. It begins with a raw LLM which is trained to respond to user prompts. Unlike traditional supervised fine-tuning (SFT) that uses a fixed dataset, dSFT employs a dynamic approach where the model itself generates instructions and responses. This method, known as self-instruct, involves using the teacher model to both answer and refine instructions based on responses.The process starts with a set of seed prompts (x₀₁, x₀₂, …, x₀_J) representing diverse topics. Each prompt is refined iteratively: for a given prompt x₀, a response y₀ is generated by the teacher model, and then a new instruction x₁ is sampled based on x₀ and y₀. The final dataset C = {(x₁, y₁), …, (x_J, y_J)} is used for fine-tuning the model.
  2. Incorporating AI feedback data from UltraFeedback:This data was crucial for refining the model's responses. In this step, the model generates responses to various prompts (like describing how to make chocolate brownies) which are then ranked by a more advanced model such as GPT-4. The highest scoring response (yw) and a randomly chosen lower-scoring response (yl) form a feedback dataset D.
  3. Applying dDPO:The last phase, Distilled Direct Preference Optimization (dDPO), involves refining the dSFT model by maximizing the probability of ranking the preferred responses higher. This is achieved by using a reward function rθ(x, y) in the preference model, which is based on the optimal LLM policy π* and the original policy πdSFT. The optimization objective is formulated as πθ = max π E (x, yw, yl) ∼ D log σ (β log π(yw|x)/πdSFT(yw|x) − β log π(yl|x)/πdSFT(yl|x)), which simplifies the training process by starting with the dSFT version of the model and iterating through each AIF triple.

The method used in Zephyr-7B mirrors the processes utilized in InstructGPT.

The method used in Zephyr-7B mirrors the processes utilized in InstructGPT.

Remarkably, Zephyr-7B achieves performance comparable to much larger 70B-parameter models aligned with human feedback. It excels in both academic benchmarks and conversational capabilities, highlighting the effectiveness of preference learning in model development. For further exploration, models, code, and instructions are available at Hugging Face's GitHub Repository.

Addressing the Challenge of Intent Alignment

A notable concern with LLMs has been their alignment with human intent. Previous models often failed to produce responses that matched user preferences, leading to inaccurate or irrelevant answers. However, recent benchmarks like MT-Bench and AlpacaEval have provided tools to quantify and improve this aspect, highlighting the superior performance of proprietary models trained with human feedback over those trained solely via distillation.

Evaluation Methods

The evaluation of Zephyr 7B involved rigorous testing across benchmarks that assess a model’s conversational abilities in both single and multi-turn contexts:

  • MT-Bench: This multi-turn benchmark requires a model to address 160 questions spanning eight domains. Each response is rated by GPT-4, with the model’s final score reflecting the average over two rounds of questions.
  • AlpacaEval: In this single-turn benchmark, the model is presented with 805 questions across various subjects. The focus here is on the model’s helpfulness, with GPT-4 scoring the responses to determine a comparative win rate.

Additionally, Zephyr 7B was tested on the Open LLM Leaderboard, which, while not a direct assessment of conversational skills, offers insights into the model's reasoning and truthfulness post-fine-tuning.

Zephyr 7B was compared to a variety of open and proprietary models, including those with different sizes and alignment methods. It established new benchmarks for 7B models on MT-Bench and AlpacaEval and showed competitive performance against larger models, validating the effectiveness of direct preference optimization (dDPO) in training.

The SFT and DPO training phases were meticulously configured, spanning multiple epochs and fine-tuning learning rates and batch sizes for optimal performance. The final Zephyr model emerged not only resistant to overfitting but also enhanced in dealing with practical tasks and academic benchmarks.

Datasets and Results

Datasets Utilized

In the development of Zephyr-7B, two key datasets were used to train and refine the model, each addressing different aspects of dialogue generation:

UltraChat Dataset

  • Source: Developed from dialogues generated by GPT-3.5-TURBO.
  • Contents: Contains 1.47 million multi-turn dialogues across 30 topics and 20 types of text material.
  • Refinement: The dataset underwent a truecasing heuristic to correct grammatical issues, and filters were applied to increase the helpfulness of responses and eliminate unhelpful prefacing phrases.

UltraFeedback Dataset

  • Source: Comprises prompts evaluated by GPT-4, which rated responses based on instruction-following, honesty, and helpfulness.
  • Contents: Includes 64,000 prompts with four responses each, rated by GPT-4.
  • Binary Preferences: Generated by choosing the response with the highest mean score as “chosen” and a random one from the remaining as “rejected” to enhance diversity and challenge the Direct Preference Optimization (DPO) process.

Both datasets are crucial for training Zephyr-7B to understand and generate human-like dialogue that is instruction-following, honest, and helpful. These datasets have been made available on the Hugging Face Hub, which you can access here.

Performance and Outcomes

The below chart illustrates the performance of Zephyr 7B across various task categories against other models such as GPT-3.5-turbo, Claude 1, GPT-4, and Llama-2-70b-chat. Categories might include Writing, Humanities, Roleplay, Reasoning, STEM, Extraction, Coding, and Math.

From the chart, we can infer which domains Zephyr 7B excels in and which domains might need further improvement. For instance, if Zephyr's line stretches further out on the Writing axis compared to others, it suggests that Zephyr is particularly strong in generating written content. Conversely, if the line is closer to the center on the Math axis, it may indicate a relative weakness in solving math problems.

The radar chart helps in identifying the strengths and weaknesses of Zephyr 7B, providing a visual representation of where it stands against larger models like GPT-4 and specialized models like Llama-2-70b-chat.

Model Performance Radar Chart

Model Performance Radar Chart

Comparing various language models on two benchmarks: MT-Bench and AlpacaEval. The models are evaluated based on their size, alignment method (such as dSFT for distilled supervised fine-tuning or dDPO for distilled direct preference optimization), and performance scores. Zephyr stands out with high scores in both benchmarks, indicating its effectiveness in generating aligned responses.

MT-Bench and AlpacaEval

MT-Bench and AlpacaEval

Conclusion

In conclusion, the development of Zephyr-7B demonstrates that alignment and distillation of conversational capabilities from a large language model (LLM) onto a smaller model can be achieved without reliance on sampling-based methods. By employing direct preference optimization (DPO) with AI feedback, Zephyr-7B leverages the strong foundation of Mistral-7B to set a new benchmark for 7B parameter chat models, showcasing the ability of smaller, open-source models to understand and respond to user intent effectively.

However, this study is not without its limitations. The reliance on GPT-4 as an evaluator for benchmarks introduces a bias towards models that are distilled from it, potentially favoring over accurate responses. Additionally, the scalability of this method to larger models, such as LLAMA2-70B, and its impact on performance gains remain areas for further research. These limitations highlight the need for continuous innovation and the development of unbiased evaluation methods in the AI community.

Looking beyond the study, it's evident that the potential for smaller models to perform at the level of larger counterparts can democratize AI, allowing for more accessible and efficient use in various applications. The success of Zephyr-7B encourages further exploration into open-source models, which can accelerate advancements in AI by fostering collaborative research and development.

NVIDIA and Genentech Forge Strategic AI Alliance for Drug Discovery

Genentech, a member of the Roche Group, and hardware giant NVIDIA have sealed a multi-year research collaboration. In a strategic alliance, Genentech will leverage its expertise in AI and extensive biological datasets, teaming up with NVIDIA’s computing power and AI capabilities. The collaboration is to enhance Genentech’s machine learning algorithms through NVIDIA’s DGX Cloud—a platform specifically tailored for AI applications in drug discovery.

Under the leadership of CEO Jensen Huang, the move will not only improve Genentech’s scientific models but also potentially enhance NVIDIA’s broader platforms. Huang envisions this partnership as a catalyst for transformative change within the healthcare sector, particularly in expediting the drug discovery process.

This collaborative effort majorly supports Genentech’s AI and machine learning ML teams, who are actively developing foundational models spanning diverse therapeutic domains. Moreover, it speeds up the implementation of Genentech’s innovative “lab in a loop” strategy, where experimental data informs computational models. These models then generate predictions that undergo real-world testing in laboratories, subsequently feeding back results to enhance and refine the computational models in a continuous improvement cycle.

In the course of their collaboration, both public and proprietary data from Genentech will be used with the company maintaining strict control over access to its private data. Notably, NVIDIA will not have direct access to Genentech’s proprietary data unless expressly permitted for a particular project.

NVIDIA also made waves earlier this year with the introduction of BioNeMo Cloud, an important component of its AI Foundations suite. This platform provides access to pre-trained AI models, a development that has already proven instrumental in expediting drug discovery processes for notable companies like Amgen and various startups.

Not just BioNeMo, NVIDIA also plays an important role in advancing drug discovery through its GPU-accelerated platform, NVIDIA Clara which integrates AI, data analysis, simulations, and visualisation to swiftly sift through extensive chemical libraries for potential drug candidates, modelling protein structures and dynamics to comprehend their roles and interactions with medications, crafting novel molecules with desired attributes, simulating drug effects within the human body, and visualising findings from drug discovery experiments.

The post NVIDIA and Genentech Forge Strategic AI Alliance for Drug Discovery appeared first on Analytics India Magazine.

Oxford AI Researchers Say LLMs Pose Risk to Scientific Truth

In November tech giant Meta unveiled a large language model called Galactica, designed to assist scientists. But instead of landing with the big bang Meta hoped for, Galactica has died with a whimper after three days of intense criticism.

A year later, the lack of dependence on these AI chatter boxes remains the same – particularly in scientific research.

In a paper published recently in Nature Human Behaviour, AI researchers from the Oxford Internet Institute have raised concerns about the potential threat that LLMs pose to scientific integrity. Brent Mittelstadt, Chris Russell and Sandra Wachter argue that LLMs, such as those based on the GPT-3.5 architecture, are not infallible sources of truth and can produce what they term as ‘hallucinations’—untruthful responses.

The authors propose a shift in how LLMs are utilized, recommending their use as ‘zero-shot translators.’ Instead of relying on LLMs as knowledge-bases, users should provide relevant information and instruct the model to transform it into the desired output. This approach facilitates easier verification of the output’s factual accuracy and consistency with the provided input.

The core issue, as outlined in the paper, lies in the nature of the data these models are trained on. Language models designed to provide helpful and convincing responses, lack guarantees regarding their accuracy or alignment with facts. Training on vast datasets sourced from online content, which may include false statements, opinions, and creative writing, exposes LLMs to non-factual information.

Prof. Mittelstadt highlighted the risk associated with users trusting LLMs as reliable sources of information, similar to human experts. Due to their design as human-sounding agents, users may be misled into accepting responses as accurate, even when devoid of factual basis or presenting a biased version of the truth.

To safeguard scientific truth and education from the spread of inaccurate and biased information, the authors advocate for setting clear expectations around the responsible use of LLMs. The paper suggests that users, especially in tasks where accuracy is vital should provide translation prompts containing factual information.

Prof. Wachter emphasised the role of responsible LLM usage in the scientific community and the need for confidence in factual information. The authors caution against the potential serious harm that could result if LLMs are haphazardly employed in generating and circulating scientific articles.

Highlighting the need for careful consideration, Prof. Russell urges a step back from the opportunities presented by LLMs and prompts a reflection on whether the technology should be granted certain opportunities simply because it can provide them.

The post Oxford AI Researchers Say LLMs Pose Risk to Scientific Truth appeared first on Analytics India Magazine.

Everybody Loves Karpathy

While the OpenAI drama was unfolding, Andrej Karpathy’s reaction to the whole situation was noteworthy, he was busy thinking about centralised and decentralised. Most recently, he even released a one-hour-long YouTube video tutorial on LLM.

Clearly, OpenAI is much much bigger than Altman, and a really important company for all of humanity and the future of AI. Its employees know that really too well. Ergo, the return of Altman. Looks like the company’s ultimate goal is to make the human-machine communication experience as seamless and personalised as possible – or rather as humane as possible, before it achieves AGI.

“Really, with a keyboard and the mouse, which is just so limited,” avered OpenAI’s Mira Murati, talking to Microsoft chief technology officer Kevin Scott in a recent interview, and sharing her frustration at the limitations of communication with machines.

Makes sense. Humans have been communicating with machines wrongly the whole time, and OpenAI made it all possible to engage with it using natural language – be it writing assignments, coding, or building an app (GPTs).

But, now OpenAI is looking to take this to a whole new level, the credit goes to Andrej Karpathy and his team.

Damn it, why does @karpathy have to blow my mind at 9 pm the night before Thanksgiving pic.twitter.com/D6y6ps5kQA

— Peter Yang (@petergyang) November 23, 2023

One of the founding members of OpenAI, Karpathy left it in 2017 to join Tesla, where he played a crucial role in projects like the humanoid robot “Optimus.” An avid supporter of open source, hee has been active in the community, offering courses and releasing libraries like minGPT and NanoGPT and even baby Llama.

In a weekend project, he adapted the Llama 2 architecture to a simplified version using nanoGPT and implemented a C inference engine in run.c, giving rise to baby Llama. This transformation aimed to replace GPT-2 with nanoGPT within the Llama 2 structure.

The Rise of Q*

Karpathy’s recent cryptic post on X, which talks about his thinking about centralisation and decentralisation all seem to be aligned. Elon Musk is also thinking about building something similar.

While other tech veterans like Clem Delangue of Hugging Face, were quick to misinterpret the situation thinking that he was taking sides of open or closed source.

Really? It’s Karpathy, who knows, he might as well be thinking of building an AI system that uses both centralised and decentralised LLM models to give better results.

All of this comes true, with OpenAI’s latest leak of Q* (pronounced Q-Star), a potential breakthrough in inching closer towards AGI, with promising results in solving mathematical problems, despite being limited to grade-school data.

The news about Q* surfaced during Altman’s dismissal, where several staff researchers sent a warning letter to the board of directors, highlighting a potentially “threatening” powerful AI discovery (Q*) with implications for humanity. Some at OpenAI believe that this breakthrough is an important step in inching towards AGI.

The Birth of Hybrid LLMs

“What else is new? And we should stop calling them large language models,” asked Elon Musk, replying to Peter Yang’s X post, which highlights the framework suggested by Karpathy.

Not sure about Musk, but in AIM universe, we would like to call these – “hybrid LLMs,” which integrate both centralised and decentralised system, revolving around optimising the performance of a targeted AI system.

This optimisation of output requires a trade-off between centralisation and decentralisation of decision-making and information distribution. In order to achieve optimal results, you have to balance these two aspects.

Plausible Use Cases

Recently, former Apple ML engineers’ Humane Ai came up with Humane Ai pin, the latest AI architecture suggested by Karpathy and his team at OpenAI that could reduce the latency and hallucination significantly, alongside ensuring data security of users. Notably, OpenAI works really closely with OpenAI, and is backed by Sam Altman.

The Humane Ai Pin, is most likely to leverage this hybrid LLM approach, blending features of both types of systems (centralised and decentralised) in its design and functionality, underpinned by the principles of edge computing by processing data locally.

Besides Humane Ai Pin, the hybrid LLMs are most likely getting integrated into products like Apple Vision Pro, Tesla Model 3, Microsoft Copilot, ChatGPT with voice, and more.

Not sure about AGI, yet. It’s time we all got rid of our phones, and not endlessly doom-scrolling, and speak to machines and seek information, as we engage with our colleagues, family, and friends – naturally.

The post Everybody Loves Karpathy appeared first on Analytics India Magazine.

TCS to Pay $125M in Epic Systems IP Dispute

In a significant blow to India’s largest IT company, Tata Consultancy Services (TCS), the US Supreme Court has rejected TCS’s appeal against a district court order imposing $140 million in punitive damages. The penalty stems from a case brought by Epic Systems Corp, alleging the infringement of intellectual property by the IT giant.

The District Court of Wisconsin had initially awarded the substantial damages as a result of TCS and Tata America allegedly accessing Epic’s web portal without authorization while providing services to a shared client. Epic contended that TCS used this unauthorised access to develop its own competitive hospital management system software, named Med Mantra.

The US Supreme Court’s decision confirmed the punitive damages in the Epic Systems case. The court’s analysis, outlined in the Seventh Circuit Order in July, revealed a deliberate and repeated effort by TCS employees to access and download confidential information from Epic’s web portal.

The court document shed light on the intentional actions taken by TCS, including disciplining an internal whistleblower, failing to preserve relevant documents, and providing false information when questioned by Epic and under oath. The court characterised this behaviour as “repeated, deliberate, and cynical.”

Following the Supreme Court’s ruling, TCS announced plans to create a provision of $125 million as an exceptional item in its financial statements. This provision is slated for the third quarter of FY24 and the nine months ending December 31, 2023, according to TCS’s filing.

The financial repercussions were reflected in the stock market, as TCS’s stock closed 0.26 percent lower at Rs 3,510.30 on the Bombay Stock Exchange (BSE) on November 21.

The decision marks a setback for TCS, emphasising the importance of respecting intellectual property rights and the severe consequences that may arise from unauthorised access and use of proprietary information.

The post TCS to Pay $125M in Epic Systems IP Dispute appeared first on Analytics India Magazine.

US chip export ban is hurting China’s AI startups, not so much the giants yet

US chip export ban is hurting China’s AI startups, not so much the giants yet Rita Liao 10 hours

Well before Washington banned Nvidia’s exports of high-performance graphic processing units to China, the country’s tech giants had been hoarding them in anticipation of an escalating tech war between the two nations.

Baidu, one of the tech firms building China’s counterparts to OpenAI, has secured enough AI chips to keep training its ChatGPT equivalent Ernie Bot for the “next year or two,” the firm’s CEO Robin Li said on an earnings call this week.

“Also, inference requires less powerful chips, and we believe our chip reserves, as well as other alternatives, will be sufficient to support lots of AI-native apps for the end users,” he said. “And in the long run, having difficulties in acquiring the most advanced chips inevitably impacts the pace of AI development in China. So, we are proactively seeking alternatives.”

Other deep-pocketed Chinese tech companies have also been taking proactive measures in response to U.S. export controls. Baidu, ByteDance, Tencent and Alibaba collectively ordered around 100,000 units of A800 processors Nvidia to be delivered this year, costing them as much as $4 billion, the Financial Times reported in August. They also purchased $1 billion worth of GPUs that are scheduled for delivery in 2024.

Such heavy upfront investments could easily deter many startups from entering the LLM race. Exceptions do exist if the young business manages to secure handsome investments quickly. 01.AI, which was founded in late March by prominent investor Kai-Fu Lee, acquired a substantial number of high-performance inference chips through loans and has already paid off its debt after raising capital that valued it at $1 billion.

With its reserve of GPUs, Baidu recently launched the Ernie Bot 4, which Li claimed is “not inferior in any respect to GPT-4.”

Rating LLMs is tricky thanks to the sheer complexity of these AI models. Many Chinese AI firms have resorted to ranking boosting by diligently fulfilling the criteria of LLM charts, but the effectiveness of these models when applied to real applications real-life is still pending judgment.

Smaller AI players, lacking the cash flow to hoard chips, will have to settle for less powerful processors that aren’t under U.S. export controls. Alternatively, they can await potential acquisition opportunities. Li expects that with a confluence of factors, including the scarcity of advanced chips, high demand for data and AI talent, and huge upfront investments, the industry will soon transition into a “consolidation stage.”

Valued at $1B, Kai-Fu Lee’s LLM startup unveils open source model

Get Over Q*, OpenAI takes AGI to the Next Level with PPO 

The OpenAI drama ends. The real action begins with the company secretly working on Q* (possibly based on Q-learning), but there is another interesting technique which is OpenAI’s all time favourite — PPO (short for proximal policy optimisation).

OpenAI’s VP product Peter Welinder recently posted on X “Everyone reading up on Q-learning. Just wait until they hear about PPO.”

https://twitter.com/npew/status/1727594232591126765

What is PPO?

PPO is a reinforcement learning algorithm used to train artificial intelligence models to make decisions in complex, or simulated environments.

Interestingly, PPO became the default reinforcement learning algorithm at OpenAI in 2017 because of its ease of use and good performance.

The “proximal” in PPO’s name refers to the constraint applied to the policy updates. This constraint helps prevent significant policy changes, contributing to more stable and reliable learning.

OpenAI employs PPO due to its effectiveness in optimising policies for sequential decision-making tasks.

Moreover, PPO strikes a balance between exploration and exploitation, crucial in reinforcement learning, by incrementally updating policies while ensuring that the changes are constrained.

OpenAI adopts PPO in a variety of use cases, ranging from training agents in simulated environments to mastering complex games.

PPO’s versatility allows it to excel in scenarios where an agent must learn a sequence of actions to achieve a specific goal, making it valuable in fields such as robotics, autonomous systems, and algorithmic trading.

Chances are pretty much that OpenAI is aiming to achieve AGI through gaming and simulated environments with help of PPO.
Interestingly earlier, this year OpenAI acquired Global Illumination to train agents in a simulated environment.

The post Get Over Q*, OpenAI takes AGI to the Next Level with PPO appeared first on Analytics India Magazine.

5 Free Courses to Master Machine Learning

5 Free Courses to Master Machine Learning
Image generated with DALLE-3

Machine learning is becoming increasingly popular in the data space. But there’s often a notion that to become a machine learning engineer you need to have an advanced degree. This, however, is not completely true. Because skills and experience trump degrees, always.

If you're reading this, you’re probably new to the data field and want to start out as a machine learning engineer. Perhaps, you already work in data as a data analyst or a BI analyst and would like to switch to a machine learning role.

Whatever your career goals are, we’ve curated a list of machine learning courses—that are completely free—to help you gain proficiency in machine learning. We’ve included courses that’ll help you understand both the theory and building machine learning models.

Let’s begin!

1. Machine Learning for Everybody

If you’re looking for a machine learning course that is accessible, Machine Learning for Everybody is for you.

Taught by Kylie Ying, this course takes a code first approach building simple and interesting machine learning models in Google Colab. Spinning up your own notebooks and building models while learning just enough theory is a great way to familiarize yourself with machine learning.

This course makes machine learning concepts accessible and covers the following topics:

  • Introduction to machine learning
  • K-Nearest Neighbors
  • Naive Bayes
  • Logistic regression
  • Linear regression
  • K-Means clustering
  • Principal Component Analysis (PCA)

Course link: Machine Learning for Everybody

2. Kaggle Machine Learning Courses

Kaggle is a great platform to take part in real-world data challenges, build your data science portfolio, and hone your model building skills. In addition, Kaggle team also has a series of micro courses to get you up to speed on the fundamentals of machine learning.

You can check out the following (micro) courses. Each course will typically take a few hours to complete and work through the exercises:

  • Intro to Machine Learning
  • Intermediate Machine Learning
  • Feature engineering

The Intro to Machine Learning course covers the following topics:

  • How ML models work
  • Data exploration
  • Model validation
  • Underfitting and overfitting
  • Random forests

In the Intermediate Machine Learning course, you’ll learn:

  • Handling missing values
  • Working with categorical variables
  • ML pipelines
  • Cross-validation
  • XGBoost
  • Data leakage

The Feature Engineering course covers:

  • Mutual information
  • Creating features
  • K-Means clustering
  • Principal Component Analysis
  • Target encoding

It's recommended to take the courses in the above order so that you have the prerequisites covered when you move from one course to the next.

Courses link:

  • Intro to Machine Learning
  • Intermediate Machine Learning
  • Feature Engineering

3. Machine Learning in Python with Scikit-Learn

Machine Learning in Python with Scikit-Learn on the FUN MOOC platform is a free self-paced course created by the developers on the scikit-learn core team.

It covers a wide breadth of topics to help you learn building machine learning models with scikit-learn. Each module contains video tutorials and accompanying Jupyter notebooks. You need to have some familiarity with Python programming and Python data science libraries to make the most of the course.

The course contents include:

  • Predictive modeling pipeline
  • Evaluating model performance
  • Hyperparameter tuning
  • Selecting the best model
  • Linear models
  • Decision tree models
  • Ensemble of models

Course Link: Machine Learning in Python with Scikit-Learn

4. Machine Learning Crash Course

Machine Learning Crash Course from Google is another good resource to learn machine learning. From the basics of building a model to feature engineering and more, this course will teach you how to build machine learning models using the TensorFlow framework.

This course is split into three main sections, with a majority of the course’s contents in the ML concepts section:

  • ML Concepts
  • ML Engineering
  • ML Systems in the Real World

To take this course, you need to be familiar with high school math, Python programming, and the command line.

The ML concepts section includes the following:

  • ML foundations
  • Introduction to TensorFlow
  • Feature engineering
  • Logistic regression
  • Regularization
  • Neural networks

The ML Engineering section covers:

  • Static vs. dynamic training
  • Static vs. dynamic inference
  • Data dependencies
  • Fairness

And ML Systems in the Real World is a set of case studies to understand how machine learning is done in the real world.

Course link: Machine Learning Crash Course

5. CS229: Machine Learning

So far, we’ve seen courses that give you a flavor of theoretical concepts while focusing on building models.

While this is a good start, you will have to understand the workings of machine learning algorithms in greater detail. This is important for cracking technical interviews, growing in your career, and getting into ML research.

CS229: Machine Learning at Stanford university is one of the most popular and highly recommended ML courses. This course will give you the same technical depth as a semester-long university course.

You can access the lectures and lecture notes online. This course covers the following broad topics:

  • Supervised learning
  • Unsupervised learning
  • Deep learning
  • Generalization and regularization
  • Reinforcement learning and control

Course Link: CS229: Machine Learning

Wrapping Up

I hope you found helpful resources to help you in your machine learning journey! These courses will help you get a good balance of theoretical concepts and practical model building.

If you’re already familiar with machine learning and are limited by time, I recommend checking out Machine Learning in Python with scikit-learn for a scikit-learn deep dive and CS229 for essential theoretical foundations. Happy learning!

Bala Priya C is a developer and technical writer from India. She likes working at the intersection of math, programming, data science, and content creation. Her areas of interest and expertise include DevOps, data science, and natural language processing. She enjoys reading, writing, coding, and coffee! Currently, she's working on learning and sharing her knowledge with the developer community by authoring tutorials, how-to guides, opinion pieces, and more.

More On This Topic

  • 5 Free Courses to Master Linear Algebra
  • 5 Free Courses to Master Calculus
  • 5 Free Courses to Master Data Science
  • 5 Free Courses to Master Generative AI
  • KDnuggets News, December 14: 3 Free Machine Learning Courses for…
  • 5 Free Books to Master Machine Learning

7 Protein Folding Updates From 2023

For over 50 years, scientists were stuck on the protein-folding problem. It’s like trying to figure out how a complex origami structure folds up. But then, in 2020, DeepMind’s AlphaFold cracked the code. It aced a big contest by predicting how proteins fold with an amazing 90% accuracy.

Jump ahead two years, and AlphaFold isn’t just a star—it’s like a superhero for understanding proteins. By 2022, it had understood the shapes of a whopping 200 million proteins, almost all we know about.

But DeepMind is not the only player. After AlphaFold’s success, labs worldwide joined the race to solve the protein puzzle. The story of protein folding keeps evolving, and it’s far from finished.

Here are 7 updates from 2023 in the domain of protein folding:

A new detailed AlphaFold

In October, Google DeepMind and Isomorphic Labs announced an upgrade to AlphaFold. This “next generation” AlphaFold claims to go beyond predicting proteins, extending its capabilities to forecast nearly all molecules in the Protein Data Bank, a repository housing the three-dimensional structural information of diverse biological molecules.

The highlight is its ability to consistently achieve “atomic accuracy” in predicting molecular structures, encompassing ligands and nucleic acids like DNA and RNA.

According to statements from the research laboratory involved, this advancement can help across various domains, including proteins, ligands, and nucleic acids. This development signifies not merely incremental progress but rather a substantial stride into the intricate landscape of molecular interactions.

AlphaFold wins the 2023 Lasker Awards

The brains behind AlphaFold Demis Hassabis and John Jumper won the Albert Lasker Basic Medical Research Award for their work in October.

This a big deal because it’s not just any award; lots of people who win this one end up winning the Nobel Prize later. If things go as they usually do, this could be the first time that research on AI, like AlphaFold, gets a shot at the Nobel Prize. In the last 20 years, a bunch of people who won the Lasker also got the Nobel – 32 of them, to be exact.

AlphaMissense

Google DeepMind also launched something called AlphaMissense. It’s a special version of AlphaFold that got really good at figuring out if certain genetic changes, called missense variants, are a big deal or not. These changes happen when one tiny part of our genes gets switched up, leading to a different building block in the protein.

The good part is that they did not keep this tech to themselves. The database they used is now open to all scientists on GitHub, a place where they share computer code. And if you want to dive deeper, there’s a whole study about it in the Science journal.

What makes AlphaMissense stand out is that it learned a lot from studying human and primate DNA. So, it can spot which genetic changes are pretty common. This could be a big help in understanding and predicting these genetic tweaks.

BioNemo Cloud

At Nvidia’s GTC 2023 event, the big company introduced BioNeMo Cloud. It’s part of their AI Foundations suite and aims to help out with life sciences research, finding new drugs, and working on proteins.

The interesting part about BioNeMo Cloud is that it gives scientists access to AI models that are already trained. They can then tweak these models to fit their own data. It’s like having a head start. Plus, it’s all in the cloud, making it easier and faster. Big biotech company Amgen and a bunch of startups are already using it to speed up their drug discovery work.

AlphaFold meets AWS HPC GPU

AlphaFold V2 got a major upgrade by teaming up with Amazon Web Services (AWS). They used HPC GPUs from NVIDIA and DLAMI instances to make it work. The platform’s predictions about molecules are mostly accurate and way better than traditional lab methods.

The Lab-R team found a way to make AlphaFold predict way faster by using these special HPC GPUs. It’s like going from a slow 8-hour process on regular computers to a quick 1-hour show on AWS HPC.

They also claimed that in less than an hour (around 45 minutes), they could run 400 sequences. If they tweak things more, they might get it down to just 30 minutes.

Meta Disbands the protein folding team

Meta decided to part ways with the team behind the groundbreaking ESMFold which was introduced two years ago. Comprising a dozen members, this team not only pioneered ESMFold but also curated an expansive database housing 600 million protein structures.

This move by Meta suggested a shift in focus from life sciences towards a more revenue-centric trajectory centred on generative AI.

Wolfram ProteinVisualisation

The Wolfram ProteinVisualisation thing is like a toolbox for exploring and seeing 3D structures in bio-molecular structures. It helps researchers look at the ins and outs of molecules, calculate contact maps and angles, and study proteins and DNA mixtures. With eleven different tools, it lets you see things like protein backbones, angles, and contact maps.

For an in-depth understanding, AIM recently conducted an interview with the creator, Soutick Saha.

The post 7 Protein Folding Updates From 2023 appeared first on Analytics India Magazine.

Phone Makers Now Wants to Run LLM On-Device

In 2022, global smartphone shipments declined by 12% to 1.2 billion units, the lowest since 2013, according to reports. The decline was mostly due to poor consumer demand. A growing number of consumers are not opting for device upgrades because they see minimal distinctions between current smartphones and earlier models, which already boast advanced cameras and processors.

To boost sales and usher in the next wave of innovations in smartphones, phone makers today are turning their attention to generative AI. At the recently held Samsung AI Forum, the South Korea-based manufacturing conglomerate showcased an on-device AI technology that incorporates Gauss, its generative AI models, with various smart devices, the KoreaTimes reported.

Samsung’s plan is not just to bring generative AI to its devices but to bring out the ‘most powerful AI phone’ to date, disrupting the smartphone market significantly.

Incorporating generative AI across its entire range of devices, Samsung aims to secure substantial market share, but formidable competition looms from rivals such as Apple, Google, and Chinese smartphone manufacturers.

All phone makers now believe generative AI could be a key selling point to boost their sales in the market. Alex Katouzian, SVP and GM of Qualcomm’s Mobile, Compute, and XR, had told indianexpress.com that what is most likely to trigger an upgrade cycle for smartphones is generative AI.

Race to bring generative AI to smartphones

Apple, the most popular smartphone maker, is also working towards introducing a host of generative AI features in iOS 18, which is expected to be released in 2024, Bloomberg reported.

Apple, which has been working on generative AI for years, was surprised by the generative explosion after OpenAI opened ChatGPT to the world. Now, Cupertino is looking to significantly improve Siri, its voice assistant feature, with generative AI.

Additionally, Apple is exploring the integration of AI features into other first-party apps, such as Apple Music, potentially introducing auto-generated playlists akin to Spotify. Notably, applications like Pages and Keynote are in line for substantial AI enhancements.

Furthermore, Apple is contemplating various approaches to implement generative AI, weighing options like a comprehensive on-device experience, a cloud-based model, or a hybrid combination of both.

Last month, Google, which is trailing in the AI arms race, looked to heavily monetise generative AI in the phone market with generative AI integration. Last month, the tech giant released Pixel 8 series, which comes with generative AI features such as magic editor, call assistant, audio magic eraser, and photo unblur, among other things.

Bindu Reddy, CEO of abacus.ai posted on X that search is a slowly dying business, but, luckily for Google, Android space presents a growth opportunity and can off-set search.

Tough competition from China

Over the last few years, Chinese phone makers have made significant headwinds in the smartphone space. Many of them were already in the race to be the first to bring generative to smartphones.

Xiaomi, which accounts for around 11% of the global smartphone market compared to Samsung’s 22%, has already introduced a host of generative AI capabilities on its smartphones. Xiaomi 14, which runs on the Snapdragon 8 Gen 3 SoC, can run an AI model with 1.3 billion parameters locally on the phone.

In August, Xiaomi’s founder and CEO, Lei Jun, revealed the integration of generative AI capabilities into the company’s digital assistant, Xiao Ai.

Similarly, earlier this month, Vivo also launched the X100 smartphone, which also runs a 7 billion parameter language model and a 1 billion parameter vision model locally on the device. Other Chinese phone makers such as Oppo and RealMe, are also following suit.

Hardware

To bring generative AI capabilities to smartphones, Samsung unveiled the Exynos 2400 processor, which features AMD’s latest RDNA3-based Xclipse 940 GPU( Graphic Processing Unit).

Samsung claims Exynos 2400 offers a 1.7x increase in CPU performance and a 14.7x boost in AI performance compared to the Exynos 2200. Reports also suggest that Exynos 2400 will debut on Samsung Galaxy S24 and Samsung Galaxy S24+ handsets, which will have generative AI capabilities.

However, even in the hardware space, other companies such as Qualcomm and MediaTek, are also making great strides. Qualcomm’s Snapdragon processors power some of the most popular Android phones in the world. Notably, many Samsung smartphones are also powered by Snapdragon processors.

The Snapdragon 8 Gen 3 processor is already powering Xiaomi 14 series of smartphones. Last month, the San Diego-based semiconductor company also announced the Snapdragon X Elite, which is capable of running generative AI models with over 13 billion parameters on-device and continues to expand Qualcomm’s AI leadership with 4.5 times faster AI processing power than competitors.

Similarly, earlier this week, MediaTek launched the Dimensity 8300 chipset, which comes with full generative AI support facilitated by the APU 780 AI processor integrated into the chipset.

“The Dimensity 8300 unlocks new possibilities for the premium smartphone segment, offering users in-hand AI, hyper-realistic entertainment opportunities, and seamless connectivity without sacrificing efficiency,” according to the company.

Notably, the Vivo X100 smartphone is powered by MediaTek’s Dimensity 9300. The new Dimensity 8300 would directly compete with Qualcomm’s Snapdragon and Samsung Exynos.

However, as it stands, the developments made in the hardware would mean generative AI capabilities would be limited to premium smartphones now. Samsung’s success will also depend on its ability to bring generative AI quickly to its smartphones in all price segments.

The post Phone Makers Now Wants to Run LLM On-Device appeared first on Analytics India Magazine.