[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75773":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":9,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},75773,"mlx-swift-lm","ml-explore\u002Fmlx-swift-lm","ml-explore","LLMs and VLMs with MLX Swift",null,"https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm","Swift",610,261,14,44,0,70,76,105,210,11.25,false,"main","2026-06-12 02:03:36","# MLX Swift LM\n\nMLX Swift LM is a Swift package to build tools and applications with large language models (LLMs) and vision language models (VLMs) in [MLX Swift](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift).\n\n> [!IMPORTANT]\n> The `main` branch is a _new_ major version number: 3.x.  In order\n> to decouple from tokenizer and downloader packages some breaking\n> changes were introduced. See [upgrading documentation](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxlmcommon\u002Fupgrade) for detailed instructions on upgrading.\n>\n> If that page shows a 404 you can view the source:\n> [upgrading](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fblob\u002Fmain\u002FLibraries\u002FMLXLMCommon\u002FDocumentation.docc\u002Fupgrade.md) \n> and [using](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fblob\u002Fmain\u002FLibraries\u002FMLXLMCommon\u002FDocumentation.docc\u002Fusing.md)\n\nSome key features include:\n\n- Model loading with integrations for a variety of tokenizer and model downloading packages.\n- Low-rank (LoRA) and full model fine-tuning with support for quantized models.\n- Many model architectures for both LLMs and VLMs.\n\nFor some example applications and tools that use MLX Swift LM, check out [MLX Swift Examples](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-examples).\n\n## Documentation\n\nDevelopers can use these examples in their own programs -- just import the swift package!\n\n- [Porting and implementing models](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxlmcommon\u002Fporting)\n- [Techniques for developing in mlx-swift-lm](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxlmcommon\u002Fdeveloping)\n- [MLXLLMCommon](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxlmcommon): Common API for LLM and VLM\n- [MLXLLM](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxllm): Large language model example implementations\n- [MLXVLM](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxvlm): Vision language model example implementations\n- [MLXEmbedders](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxembedders): Popular encoders and embedding models example implementations\n\n## Usage\n\nThis package integrates with a variety of tokenizer and downloader packages through protocol conformance. Users can pick from three ways to integrate with these packages, which offer different tradeoffs between freedom and convenience.\n\nSee documentation on [how to integrate mlx-swift-lm and downloaders\u002Ftokenizers](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxlmcommon\u002Fusing).\n\n> [!NOTE]\n> If the documentation link shows a 404, view the\n> [source](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fblob\u002Fmain\u002FLibraries\u002FMLXLMCommon\u002FDocumentation.docc\u002Fusing.md).\n\n## Installation\n\nAdd the core package to your `Package.swift`:\n\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm\", .upToNextMajor(from: \"3.31.3\")),\n```\n\nThen chose an [integration package for downloaders and tokenizers](https:\u002F\u002Fswiftpackageindex.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fmain\u002Fdocumentation\u002Fmlxlmcommon\u002Fusing#Integration-Packages).\n\n> [!NOTE]\n> If the documentation link shows a 404, view the\n> [source](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm\u002Fblob\u002Fmain\u002FLibraries\u002FMLXLMCommon\u002FDocumentation.docc\u002Fusing.md).\n\n\n## Quick Start\n\nSee also [MLXLMCommon](Libraries\u002FMLXLMCommon). The simplest way to get started is using the `MLXHuggingFace` macros, which provide a default Hugging Face downloader and tokenizer integration.\n\n## Package.swift\n\n```swift\ndependencies: [\n    .package(url: \"https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-swift-lm\", .upToNextMajor(from: \"3.31.3\")),\n    .package(url: \"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fswift-huggingface\", from: \"0.9.0\"),\n    .package(url: \"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fswift-transformers\", from: \"1.3.0\"),\n],\ntargets: [\n    .target(\n        name: \"YourTargetName\",\n        dependencies: [\n            .product(name: \"MLXLLM\", package: \"mlx-swift-lm\"),\n            .product(name: \"MLXLMCommon\", package: \"mlx-swift-lm\"),\n            .product(name: \"MLXHuggingFace\", package: \"mlx-swift-lm\"),\n            .product(name: \"HuggingFace\", package: \"swift-huggingface\"),\n            .product(name: \"Tokenizers\", package: \"swift-transformers\"),\n        ]),\n]\n```\n\n## Usage\n\n```swift\nimport MLXLLM\nimport MLXLMCommon\nimport MLXHuggingFace\nimport HuggingFace\nimport Tokenizers\n\nlet model = try await #huggingFaceLoadModelContainer(\n    configuration: LLMRegistry.gemma3_1B_qat_4bit\n)\n\nlet session = ChatSession(model)\nprint(try await session.respond(to: \"What are two things to see in San Francisco?\"))\nprint(try await session.respond(to: \"How about a great place to eat?\"))\n```\n\nFor alternative integration approaches (custom downloaders, alternative tokenizer packages, local-only weights), see the [using documentation](Libraries\u002FMLXLMCommon\u002FDocumentation.docc\u002Fusing.md).","MLX Swift LM 是一个用于在 MLX Swift 中构建基于大语言模型（LLMs）和视觉语言模型（VLMs）的工具和应用的 Swift 包。其核心功能包括支持多种分词器和模型下载包的集成、低秩（LoRA）和全模型微调以及量化模型的支持，并提供了丰富的模型架构选择。该项目特别适合需要在 Swift 环境下开发自然语言处理或计算机视觉相关应用的开发者，能够帮助他们快速实现从模型加载到具体功能实现的全过程。通过遵循详细的文档指导，用户可以根据自己的需求灵活选择与不同库的集成方式，从而平衡自由度与便捷性。",2,"2026-06-11 03:53:19","trending"]