-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test with tis model https://huggingface.co/mike-ravkine/gpt_bigcode-santacoder-GGML + update ggml to d2b178ee747cfb0a0a1892da362d068080659170 + update llama to 6e7cca404748dd4b1a3affd0d1296e37f4ac0a6f
- Loading branch information
Showing
28 changed files
with
5,854 additions
and
2,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,38 @@ | ||
// | ||
// Starcoder.swift | ||
// LLMFarm | ||
// GPTNeoX.swift | ||
// Mia | ||
// | ||
// Created by guinmoon on 16.07.2023. | ||
// Created by Byron Everson on 4/19/23. | ||
// | ||
|
||
import Foundation | ||
import llmfarm_core | ||
|
||
public class Starcoder: GPTBase { | ||
|
||
public override func load_model(path: String = "", contextParams: ModelContextParams = .default, params:gpt_context_params ) throws -> Bool{ | ||
self.context = starcoder_init_from_file(path, params) | ||
self.promptFormat = .None | ||
return true | ||
} | ||
|
||
deinit { | ||
gpt2_free(context) | ||
} | ||
|
||
public override func gpt_eval(inputBatch:[ModelToken]) throws -> Bool{ | ||
if starcoder_eval(context, inputBatch, Int32(inputBatch.count), nPast, contextParams.numberOfThreads) != 0 { | ||
throw ModelError.failedToEval | ||
} | ||
return true | ||
} | ||
|
||
public override func gpt_init_logits() throws -> Bool { | ||
if starcoder_init_logits(context, contextParams.numberOfThreads) != 0 { | ||
throw ModelError.failedToEval | ||
} | ||
return true | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.