mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-08-22 06:55:26 +00:00
* ci: change swift version to stable * ci: change trigger for test * revert changes * ci: fix version * ci: change display text from branch to tag * a * ci * fix trigger * fix * fix for android (use float func) * ci: heckout with submodules * ci: remove unneccesary files * ふぃふぃふぃ * ci: copy neccesary files * ci: fix for arm build * ci: arm * nn> * a * tree * cp -r * haaa? * ci: 大文字と小文字 * ci: re * ci: copy resource folder * ci: change path * ci: default dictionary * ci: こうか? * ci: revert changes * ci: clean workflow * fix * n * a * ci: incorporate jobs * fix variable * fix path * ci: incorporate android actions to swift.yml * fix * ci: fix yaml syntax error * ci: fix syntax error? * ci: format * ci: use valid yml * ci: use release tag instead of latest tag * ci: cache * ci: build llama on android? * ci: add header include path * a * a * hensu * fix: llama mock * uninclude llama * change os(android) to canimport(andoid) * a * remove linux * a * n * ci: check with env value * fix LLAMA_MOCK * Update .gitignore
59 lines
2.6 KiB
Swift
59 lines
2.6 KiB
Swift
private func unimplemented<T>() -> T {
|
|
fatalError("unimplemented")
|
|
}
|
|
|
|
package typealias llama_token = Int32
|
|
package typealias llama_pos = Int32
|
|
package typealias llama_seq_id = Int32
|
|
|
|
package struct llama_context_params {
|
|
package var seed: Int
|
|
package var n_ctx: Int
|
|
package var n_threads: UInt32
|
|
package var n_threads_batch: UInt32
|
|
package var n_batch: Int
|
|
}
|
|
package func llama_context_default_params() -> llama_context_params { unimplemented() }
|
|
|
|
package typealias llama_context = OpaquePointer
|
|
package func llama_new_context_with_model(_ model: llama_model, _ ctx_params: llama_context_params) -> llama_context? { unimplemented() }
|
|
package func llama_free(_ context: llama_context) {}
|
|
|
|
package typealias llama_model = OpaquePointer
|
|
|
|
package func llama_free_model(_ model: llama_model) {}
|
|
|
|
package func llama_backend_init() {}
|
|
package func llama_backend_free() {}
|
|
|
|
package struct llama_model_params {
|
|
package var use_mmap: Bool
|
|
}
|
|
package func llama_model_default_params() -> llama_model_params { unimplemented() }
|
|
|
|
package func llama_load_model_from_file(_ path: String, _ model_params: llama_model_params) -> llama_model? { unimplemented() }
|
|
|
|
package func llama_kv_cache_seq_rm(_ ctx: llama_context, _ seq_id: llama_seq_id, _ p0: llama_pos, _ p1: llama_pos) {}
|
|
package func llama_kv_cache_seq_pos_max(_ ctx: llama_context, _ seq_id: llama_seq_id) -> Int { unimplemented() }
|
|
|
|
package struct llama_batch {
|
|
package var token: [llama_token]
|
|
package var pos: [llama_pos]
|
|
package var n_seq_id: [llama_seq_id]
|
|
package var seq_id: [[llama_seq_id]?]
|
|
package var logits: UnsafeMutablePointer<Float>
|
|
package var n_tokens: Int
|
|
|
|
}
|
|
package func llama_batch_init(_ n_tokens: Int, _ embd: Int, _ n_seq_max: Int) -> llama_batch { unimplemented() }
|
|
|
|
package func llama_n_ctx(_ ctx: llama_context) -> Int { unimplemented() }
|
|
package func llama_n_vocab(_ model: llama_model) -> Int { unimplemented() }
|
|
|
|
package func llama_tokenize(_ model: llama_model, _ text: String, _ text_len: Int32, _ tokens: UnsafeMutablePointer<llama_token>, _ n_tokens_max: Int32, _ add_special: Bool, _ parse_special: Bool) -> Int { unimplemented() }
|
|
package func llama_token_bos(_ model: llama_model) -> llama_token { unimplemented() }
|
|
package func llama_token_eos(_ model: llama_model) -> llama_token { unimplemented() }
|
|
package func llama_token_to_piece(_ model: llama_model, _ token: llama_token, _ buf: UnsafeMutablePointer<Int8>, _ length: Int32, _ special: Bool) -> Int32 { unimplemented() }
|
|
|
|
package func llama_decode(_ ctx: llama_context, _ batch: llama_batch) -> Int { unimplemented() }
|
|
package func llama_get_logits(_ ctx: llama_context) -> UnsafeMutablePointer<Float>? { unimplemented() } |