Based on the available documentation about Apple Intelligence, the statement that "AFM cannot vectorize data" appears to be partially true in a specific context.[1]
Apple Foundation Models (AFM) are primarily designed for text generation, summarization, extraction, and other language understanding tasks rather than generating embedding vectors for use in vector databases. The Foundation Models framework provides capabilities for generating text content, creating Swift data structures, and tool calling, but does not explicitly include functionality for generating text embeddings or vectorizing data for retrieval augmented generation (RAG) applications.[1]
For developers needing to vectorize data on Apple devices, separate solutions are available:
- NLEmbedding: Apple provides the NLEmbedding framework from Natural Language, which can generate embeddings entirely offline on-device, though the quality may not match cloud-based embedding models[2]
- Third-party solutions: Developers can use OpenAI or other services to create embedding vectors and store them locally in databases like GRDB, VecturaKit, or ObjectBox[2]
While AFM doesn't generate embeddings for external use, the models internally use embedding layers that map inputs into vectors for processing. The on-device model uses a vocabulary size of 49K tokens, while the server model uses 100K tokens. These embedding layers are quantized to 4 bits per weight to reduce memory requirements.[3][1]