Skip to content

Commit 5f8f583

Browse files
authored
Update MLXLLM and MLXVLM README.md (#307)
1 parent 3013e71 commit 5f8f583

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Libraries/MLXLLM/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,17 @@ In [LLMModelFactory.swift](LLMModelFactory.swift) register the model type itself
126126
(this is independent of the model id):
127127

128128
```swift
129-
public class ModelTypeRegistry: @unchecked Sendable {
129+
public class LLMTypeRegistry: @unchecked Sendable {
130130
...
131131
private var creators: [String: @Sendable (URL) throws -> any LanguageModel] = [
132132
"yourModel": create(YourModelConfiguration.self, YourModel.init),
133133
```
134134

135-
Add a constant for the model in the `ModelRegistry` (not strictly required but useful
135+
Add a constant for the model in the `LLMRegistry` (not strictly required but useful
136136
for callers to refer to it in code):
137137

138138
```swift
139-
public class ModelRegistry: @unchecked Sendable {
139+
public class LLMRegistry: @unchecked Sendable {
140140
...
141141
static public let yourModel_4bit = ModelConfiguration(
142142
id: "mlx-community/YourModel-4bit",

Libraries/MLXVLM/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ In [VLMModelFactory.swift](VLMModelFactory.swift) register the model type itself
341341
(this is independent of the model id):
342342

343343
```swift
344-
public class ModelTypeRegistry: @unchecked Sendable {
344+
public class VLMTypeRegistry: @unchecked Sendable {
345345
...
346346
private var creators: [String: @Sendable (URL) throws -> any LanguageModel] = [
347347
"yourModel": create(YourModelConfiguration.self, YourModel.init),
@@ -350,19 +350,19 @@ public class ModelTypeRegistry: @unchecked Sendable {
350350
Similarly, register the UserInputProcessor type (`preprocessor_config.json`):
351351

352352
```swift
353-
public class ProcessorTypeRegistry: @unchecked Sendable {
353+
public class VLMProcessorTypeRegistry: @unchecked Sendable {
354354
...
355355
private var creators:
356356
[String: @Sendable (URL, any Tokenizer) throws -> any UserInputProcessor] = [
357357
"YourModelProcessor": create(
358358
YourModelProcessorConfiguration.self, YourModelProcessor.init),
359359
```
360360

361-
Add a constant for the model in the ModelRegistry (not strictly required but useful
361+
Add a constant for the model in the VLMRegistry (not strictly required but useful
362362
for callers to refer to it in code):
363363

364364
```swift
365-
public class ModelRegistry: @unchecked Sendable {
365+
public class VLMRegistry: @unchecked Sendable {
366366
...
367367
static public let yourModel_4bit = ModelConfiguration(
368368
id: "mlx-community/YourModel-4bit",

0 commit comments

Comments
 (0)