Highlights from Machine Translation and Multilinguality in December 2024 and January 2025

MuLan: Adapting Multilingual Diffusion Models for Hundreds of Languages with Negligible Cost Researchers from Tsinghua, Shanghai, Beijing, Hong Kong, and Johns Hopkins have developed a method for adapting diffusion models to hundreds of languages at a minimal cost. They achieve this by swapping the text encoder with a multilingual one and training it to produce representations consistent with the CLIP encoder, leveraging parallel language data and English image-text data. The results look impressive and multilingual, and the generation quality, as […]

Read more

Quiz: How to Join Strings in Python

Interactive Quiz ⋅ 12 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of How to Join Strings in Python. By working through this quiz, you’ll review how to use .join() to combine strings with a specified separator and handle non-string data in iterables. You’ll also revisit how .join() compares to other concatenation methods and how it’s optimized in CPython. The quiz contains 12 questions and there is no time limit. You’ll get 1 point for each correct […]

Read more

Quiz: Python “for” Loops: The Pythonic Way

Interactive Quiz ⋅ 11 QuestionsBy Leodanis Pozo Ramos Share In this quiz, you’ll test your understanding of Python’s for loop. By working through this quiz, you’ll revisit how to iterate over items in a data collection, how to use range() for a predefined number of iterations, and how to use enumerate() for index-based iteration. The quiz contains 11 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll […]

Read more

Quiz: How to Split a String in Python

Interactive Quiz ⋅ 9 QuestionsBy Martin Breuss Share In this quiz, you’ll test your understanding of Python’s .split() method. Python’s .split() method lets you divide a string into a list of substrings based on a specified delimiter. By default, .split() separates at whitespace, including spaces, tabs, and newlines. You can customize .split() to work with specific delimiters using the sep parameter, and control the amount of splits with maxsplit. The quiz contains 9 questions and there is no time limit. […]

Read more

How to Split a String in Python

Python’s .split() method lets you divide a string into a list of substrings based on a specified delimiter. By default, .split() separates at whitespace, including spaces, tabs, and newlines. You can customize .split() to work with specific delimiters using the sep parameter, and control the amount of splits with maxsplit. By the end of this tutorial, you’ll understand that: You split a string by spaces in Python using .split() without arguments. Python’s .split() method can split on custom delimiters when […]

Read more

Advances to low-bit quantization enable LLMs on edge devices

Large language models (LLMs) are increasingly being deployed on edge devices—hardware that processes data locally near the data source, such as smartphones, laptops, and robots. Running LLMs on these devices supports advanced AI and real-time services, but their massive size, with hundreds of millions of parameters, requires significant memory and computational power, limiting widespread adoption. Low-bit quantization, a technique that compresses models and reduces memory demands, offers a solution by enabling more efficient operation. Recent  

Read more

NumPy Techniques and Practical Examples

The NumPy library is a Python library used for scientific computing. It provides you with a multidimensional array object for storing and analyzing data in a wide variety of ways. In this video course, you’ll see examples of some features NumPy provides that aren’t always highlighted in other tutorials. In this video course, you’ll learn how to: Create multidimensional arrays from data stored in files Identify and remove duplicate data from a NumPy array Use structured NumPy arrays to reconcile […]

Read more

Python for Loops: The Pythonic Way

Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: For Loops in Python (Definite Iteration) Python’s for loop allows you to iterate over the items in a collection, such as lists, tuples, strings, and dictionaries. The for loop syntax declares a loop variable that takes each item from the collection in each iteration. This loop is ideal for repeatedly executing a block of […]

Read more

Research Focus: Week of January 27, 2025

In this edition: We introduce FLAVARS, a multimodal foundation language and vision alignment model for remote sensing; Managed-retention memory, a new class of memory which is more optimized to store key data structures for AI inference workloads; and Enhanced detection of macular telangiectasia type 2 (MacTel 2) using self-supervised learning and ensemble models. We present a new approach to generalizing symbolic automata, which brings together a variety of classic automata and logics in a unified framework with all the necessary […]

Read more

The surprising way to save memory with BytesIO

If you need a file-like object that stores bytes in memory in Python, chances are you you’re using Pytho’s built-in io.BytesIO(). And since you’re already using an in-memory object, if your data is big enough you probably should try to save memory when reading that data back out. After all, it’s better not to have two copies of all the data in memory when only one will suffice. In this article we’ll cover: A quick intro to BytesIO. The memory […]

Read more
1 2 3 913