Skip to content

Commit 169650a

Browse files
authored
Add LLama 3.2 1B and 3B lightweight models descriptions (#130)
* Add LLama 3.2 1B and 3B lightweight models * Add LLama 3.2 1B and 3B lightweight models * Fix formatting
1 parent fcef84d commit 169650a

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Libraries/LLM/Models.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,22 @@ extension ModelConfiguration {
229229
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\nYou are a helpful assistant<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\(prompt)<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>"
230230
}
231231

232+
public static let llama3_2_1B_4bit = ModelConfiguration(
233+
id: "mlx-community/Llama-3.2-1B-Instruct-4bit",
234+
defaultPrompt: "What is the difference between a fruit and a vegetable?"
235+
) {
236+
prompt in
237+
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\nYou are a helpful assistant<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\(prompt)<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>"
238+
}
239+
240+
public static let llama3_2_3B_4bit = ModelConfiguration(
241+
id: "mlx-community/Llama-3.2-3B-Instruct-4bit",
242+
defaultPrompt: "What is the difference between a fruit and a vegetable?"
243+
) {
244+
prompt in
245+
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\nYou are a helpful assistant<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\(prompt)<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>"
246+
}
247+
232248
private enum BootstrapState: Sendable {
233249
case idle
234250
case bootstrapping
@@ -245,6 +261,8 @@ extension ModelConfiguration {
245261
bootstrapState = .bootstrapping
246262
register(configurations: [
247263
llama3_1_8B_4bit,
264+
llama3_2_1B_4bit,
265+
llama3_2_3B_4bit,
248266
mistralNeMo4bit,
249267
smolLM_135M_4bit,
250268
mistral7B4bit,

mlx-swift-examples.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3555,7 +3555,7 @@
35553555
repositoryURL = "https://github.com/huggingface/swift-transformers";
35563556
requirement = {
35573557
kind = upToNextMajorVersion;
3558-
minimumVersion = 0.1.9;
3558+
minimumVersion = 0.1.12;
35593559
};
35603560
};
35613561
C392736E2B60699100368D5D /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {

0 commit comments

Comments
 (0)