File size: 1,332 Bytes
143bcfb
 
 
 
 
 
 
 
 
07e5e01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: Multi Beam Text Streamer
emoji: πŸ†
colorFrom: green
colorTo: pink
sdk: docker
pinned: false
short_description: A generic text streamer that supports beam search and manage
---
# Beam Search Generator with MultiBeamTextStreamer

This Hugging Face Space hosts a **Beam Search Generator** web application, powered by a Flask backend and integrated with Hugging Face Transformers. The application provides real-time visualization of beam search generation, offering insights into how language models explore multiple text completion possibilities simultaneously.

## πŸš€ Features

- Real-time visualization of active and completed beams.
- Adjustable generation parameters:
  - Number of beams.
  - Maximum tokens.
  - Generation speed (using delay sliders).
- Seamless interaction with Hugging Face Transformers.
- Powered by the custom `MultiBeamTextStreamer` from the Transformers library.

## πŸ“œ How It Works

1. Input a **prompt** in the text box.
2. Configure generation settings:
   - Number of beams.
   - Maximum token count.
   - Delay speed.
3. Click **Generate** to visualize the beam search process in real-time.

## πŸ› οΈ Setup Instructions

### Running Locally

1. **Clone the repository**:
   ```bash
   git clone https://huggingface.co/spaces/<your-username>/<your-space-name>
   cd <your-space-name>