Skip to content

Commit

Permalink
🎨 Format Code
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmai-dev committed Sep 21, 2024
1 parent 3b1752e commit 41f42b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions ChatMLX/Components/UltramanNavigationSplitView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ extension View {
preference(
key: UltramanNavigationToolbarKey.self,
value: [
UltramanToolbarItem(alignment: alignment, content: {
content()
})
UltramanToolbarItem(
alignment: alignment,
content: {
content()
})
]
)
}
Expand Down
12 changes: 6 additions & 6 deletions ChatMLX/Utilities/LLMRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//

import Defaults
import Metal
import MLX
import MLXLLM
import MLXRandom
import Metal
import SwiftUI
import Tokenizers

Expand Down Expand Up @@ -117,10 +117,8 @@ class LLMRunner {

let result = await modelContainer.perform {
model,
tokenizer in



tokenizer in

MLXLLM.generate(
promptTokens: messageTokens,
parameters: GenerateParameters(
Expand All @@ -132,7 +130,9 @@ class LLMRunner {
),
model: model,
tokenizer: tokenizer,
extraEOSTokens: modelConfiguration.extraEOSTokens.union(["<|im_end|>", "<|end|>"])
extraEOSTokens: modelConfiguration.extraEOSTokens.union([
"<|im_end|>", "<|end|>",
])
) { tokens in
if tokens.count % displayEveryNTokens == 0 {
let text = tokenizer.decode(tokens: tokens)
Expand Down

0 comments on commit 41f42b7

Please sign in to comment.