llmreference
Cloudflare Workers AI

Using Gemma 7B Instruct on Cloudflare Workers AI

Implementation guide · Gemma · Google DeepMind

ServerlessOpen Source

Quick Start

  1. 1
    Create an account at Cloudflare Workers AI and generate an API key.
  2. 2
    Use the Cloudflare Workers AI SDK or REST API to call gemma-7b-it — see the documentation for request format.

Code Examples

See Cloudflare Workers AI documentation for integration details.

About Cloudflare Workers AI

Cloudflare Workers AI is a serverless GPU inference platform enabling developers to run machine learning models on Cloudflare's global edge network. It supports diverse AI tasks including text generation, image classification, automatic speech recognition, and real-time language translation. The platform provides pay-per-use pricing and access to a curated library of open-source models from Hugging Face, enabling rapid deployment without complex infrastructure management. Key features include low-latency edge computing, streaming responses for large language models, context length customization, and the AI Gateway for monitoring, caching, and cost optimization.

Cloudflare is a leading connectivity cloud company that provides a comprehensive suite of cloud-native products and developer tools to enhance web performance, security, and reliability. Their services include content delivery network (CDN), DDoS mitigation, DNS services, and zero trust security solutions. While Cloudflare doesn't primarily market itself as an AI platform, they have incorporated AI and machine learning technologies into various aspects of their services to improve performance and security, including threat detection capabilities, content delivery optimization, and intelligent routing decisions across their global network.

Pricing on Cloudflare Workers AI

Capabilities

Structured Outputs

About Gemma 7B Instruct

Gemma 7B Instruct is a cutting-edge large language model developed by Google DeepMind, boasting 7 billion parameters. As part of the Gemma family, it benefits from the advanced research underpinning Google's Gemini models. This model is optimized for text generation tasks, excelling in areas like question answering and summarization, and it is finely tuned to follow instructions effectively. Despite its compact size, Gemma 7B Instruct performs impressively on benchmarks, making it versatile for deployment across various hardware platforms, from laptops to cloud infrastructure. Moreover, it is open-source, with accessible weights and incorporates responsible AI practices, such as data filtering and human feedback, to ensure safe and ethical use.

Model Specs

Released2024-02-21
Parameters7B
Context8K
ArchitectureDecoder Only
Knowledge cutoff2023-04

Provider

Cloudflare Workers AI
Cloudflare Workers AI

Cloudflare

San Francisco, California, United States