--- license: mit tags: - t5 - embeddings - prompts - feature-extraction language: - en pretty_name: "T5-XXL Embeddings for Image Generation Prompts" task_categories: - feature-extraction - text-to-image --- # T5-XXL Embeddings for Image Generation Prompts This dataset contains 4096-dimensional text embeddings for prompts from the [Gustavosta/Stable-Diffusion-Prompts](https://huggingface.co/datasets/Gustavosta/Stable-Diffusion-Prompts) dataset. ## Model Used The embeddings were generated using a T5-XXL encoder model. Specifically, the weights from `t5xxl_fp8_e4m3fn_scaled.safetensors` were used. **Important Note:** While the source model weights were in a FP8 format, the embeddings in this dataset have been calculated and stored in full **`float32`** precision to ensure numerical stability and maximum quality. ## Data Fields - `Prompt`: A `string` containing the original text prompt. - `vector`: A `list` of `float32` numbers, representing the 4096-dimensional embedding of the prompt. ## Data Splits - `train`: Contains 73718 prompts and their corresponding vectors. - `test`: Contains 8192 prompts and their corresponding vectors, sampled from the end of the original train set. ## Usage You can load the dataset easily using the `datasets` library: ```python from datasets import load_dataset # Load the dataset dataset = load_dataset("JusteLeo/t5-xxl-embedding") # Access the splits train_data = dataset['train'] test_data = dataset['test'] # Example print(train_data[0]['Prompt']) print(len(train_data[0]['vector'])) # Output: 4096 ``` ### Citation and Credits This dataset of embeddings was created by [JusteLeo](https://huggingface.co/JusteLeo). If you use this dataset in your work, please consider citing this repository. #### Original Data The text prompts used as a basis for this dataset are from the `Gustavosta/Stable-Diffusion-Prompts` dataset. A huge thank you to Gustavosta for providing the initial data. - **Original Prompt Dataset:** [Gustavosta/Stable-Diffusion-Prompts](https://huggingface.co/datasets/Gustavosta/Stable-Diffusion-Prompts) #### Model The embeddings were generated using an encoder based on the T5-XXL architecture. - **Base Model Architecture:** [google/t5-v1_1-xxl](https://huggingface.co/google/t5-v1_1-xxl) by Google. - **Specific Encoder Weights:** The model was loaded with specific `fp8` quantized weights from the `t5xxl_fp8_e4m3fn_scaled.safetensors` file. ### License This dataset is licensed under the [MIT License](LICENSE).