A macOS application that generates text embeddings using BERT, built with SwiftUI and the Apple Embeddings framework.
Swift Embeddings is a simple desktop application that allows users to generate vector embeddings from text input. It uses Apple's Embeddings framework to run BERT (Bidirectional Encoder Representations from Transformers) locally on your machine.
- Clean, native macOS interface
- Real-time text embedding generation
- Display of embedding vector preview (first 5 values)
- Error handling and loading states
- Sandboxed application for security
- macOS 14.0 or later
- Xcode 15.0 or later
- Clone the repository
- Make sure BERT model files are placed them in the app's resource directory:
- config.json
- pytorch_model.bin
- tokenizer.json
- vocab.txt
- tokenizer_config.json
- special_tokens_map.json
- Open the project in Xcode
- Build and run the application
- Launch the application
- Enter text in the input field
- Click "Generate Embedding" to create the embedding vector
- View the first 5 values of the resulting embedding
- Built with SwiftUI
- Uses Apple's Embeddings framework for BERT model integration
- Implements async/await for non-blocking operations
- Includes comprehensive error handling and debug logging