llmreference
Cloudflare Workers AI

Using Falcon 7B on Cloudflare Workers AI

Implementation guide · Falcon · Technology Innovation Institute (TII)

Serverless

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 falcon-7b — 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 Falcon 7B

Falcon-7B, developed by the Technology Innovation Institute, is a cutting-edge large language model boasting a decoder-only architecture with 7 billion parameters. It's trained on 1,500 billion tokens from the curated web dataset, RefinedWeb, enhancing its performance in language tasks. The model is equipped with advanced features like FlashAttention and multiquery attention, optimizing speed and memory usage. With 32 layers and rotary positional embeddings, it manages a sequence length of up to 2048 tokens efficiently. Renowned for tasks such as text generation, summarization, translation, and conversational AI, Falcon-7B is open-source under Apache 2.0, suitable even for consumer hardware, needing at least 16GB of memory for inference 236.

Model Specs

Released2023-11-28
Parameters7B
ArchitectureDecoder Only

Provider

Cloudflare Workers AI
Cloudflare Workers AI

Cloudflare

San Francisco, California, United States