Skip to content

Commit 07f6707

Browse files
authored
Remove old Architecture.swift (#69)
Configuration data should always be present in the Hub config files.
1 parent 5105f72 commit 07f6707

File tree

2 files changed

+3
-71
lines changed

2 files changed

+3
-71
lines changed

Sources/Models/LanguageModel.swift

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -172,34 +172,18 @@ public extension LanguageModel {
172172
try await textGenerationParameters?.doSample?.boolValue ?? true
173173
}
174174
}
175-
176-
var architecture: Architecture? {
177-
get async throws {
178-
guard let modelType = try await modelType else { return nil }
179-
return Architecture.from(modelType: modelType)
180-
}
181-
}
182-
183-
var padTokenId: Int? {
184-
get async throws {
185-
guard let architecture = try await architecture else { return nil }
186-
return architecture.padTokenId ?? architecture.eosTokenId
187-
}
188-
}
189-
175+
190176
var bosTokenId: Int? {
191177
get async throws {
192178
let modelConfig = try await modelConfig
193-
if let bosTokenId = modelConfig.bosTokenId?.intValue { return bosTokenId }
194-
return try await architecture?.bosTokenId
179+
return modelConfig.bosTokenId?.intValue
195180
}
196181
}
197182

198183
var eosTokenId: Int? {
199184
get async throws {
200185
let modelConfig = try await modelConfig
201-
if let eosTokenId = modelConfig.eosTokenId?.intValue { return eosTokenId }
202-
return try await architecture?.eosTokenId
186+
return modelConfig.eosTokenId?.intValue
203187
}
204188
}
205189

Sources/Tokenizers/Architecture.swift

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)