Smaller, faster, safer: running Kimi and GLM at scale
Cloudflare runs inference for Moonshot's Kimi and Z.ai's GLM models on GPUs in data centers close to users.
Overview
Cloudflare runs large AI models called Kimi and GLM on GPUs in its data centersA facility built to house thousands of servers, storage drives, and network switches with backup power and cooling to serve users. These models are difficult to run efficiently because they require a lot of memory to process long conversations. To fit more requests into the available hardware, Cloudflare uses three techniques: quantizing the KV cache, compressing model weightsThe billions of learned numerical values that store what a trained artificial intelligence model knows, and protecting the shared cache. By storing the cache in 8-bit1 binary digit, a 1 or a 0 (a switch that is on or off) precision instead of 16-bit, the system can hold twice as much context, increasing capacity from roughly 686,000 tokensA short-lived digital pass that a server gives a logged-in user or app to about 1.37 million tokens. This approach allows Cloudflare to support more customers at lower costs without changing the model accuracy. The optimizations enable the company to handle more concurrent requests on shared hardware while maintaining performance.
Terms in this story
- data centers
- A facility built to house thousands of servers, storage drives, and network switches with backup power and cooling. Cloud providers and large enterprises run their services inside data centers, where physical security, power redundancy, and high-speed network links keep online systems running.
- model weights
- The billions of learned numerical values that store what a trained artificial intelligence model knows. Training a frontier AI model costs millions of dollars in computing time, so protecting the resulting model weights from theft is a top priority for AI labs.
- bit
- 1 binary digit, a 1 or a 0 (a switch that is on or off). Every file, network packet, and cryptographic key in a computer is stored as a long sequence of bits, and key strength is measured by how many bits the key contains. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
- token
- A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. Security+ objective 4.6 lists the term
- frontier models
- The largest, most capable generation of general-purpose artificial intelligence models. Researchers and governments test frontier AI systems before release to see whether they can discover software vulnerabilities on their own or help novices plan cyberattacks.
- integrity
- The property that data was not changed. File checksums and digital signatures protect integrity so you know a downloaded software update or bank wire instruction was not altered in transit by an attacker. From the CYBR 101 room CYBR 101: What is a hash?
- inference
- Running a trained artificial intelligence model on new input to generate an answer or prediction. Training builds the AI model once, while inference happens every time a user sends a prompt to a chatbot, which is where prompt injection and data leaks occur.
- production
- The live servers and databases that real customers actually use, as opposed to internal test machines. A bug or breach in a company's production environment directly affects live users and real customer records.
- open-source
- Software whose source code is publicly available for anyone to inspect, use, modify, and share. Most websites and apps rely on hundreds of open-source code libraries, so a single security flaw or malicious update in a popular library can affect thousands of companies at once.
- patches
- A software update released by a developer to fix a bug or close a security flaw. When a software flaw is discovered, the vendor ships a patch so administrators and ordinary users can update their systems before attackers exploit the bug. Security+ objective 4.3 lists the term
- keys
- The secret value that locks or opens a message. Many breach and ransomware stories come down to who holds the cryptographic key, since strong encryption protects data only as long as the key stays secret. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
- kernel
- The core part of an operating system that manages memory, hardware, and every running program. Because the kernel has complete control over the computer, a kernel vulnerability or malicious kernel driver lets an attacker bypass security software that runs at the normal program level.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the Cloudflare website. Cite the article, not this page.
Read the full article on Cloudflare (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Research and reports
"Workers AI runs inference for some of the best open models in the world..." Found by reading the article; these exact words are in it - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"......Here's how we quantize KV caches, compress model weights, and add integrity checks to serve..." Found in the opening sentences
How a story is connected to the course, and every objective, week and job role