mirror of https://github.com/google/gemma.cpp.git
Add internal initialization code to debug_prompt.
PiperOrigin-RevId: 642276350
This commit is contained in:
parent
57d0ea95d0
commit
8ec8eef524
|
|
@ -234,6 +234,7 @@ cc_binary(
|
|||
":app",
|
||||
":args",
|
||||
":gemma_lib",
|
||||
# "//base",
|
||||
"//compression:io",
|
||||
"@hwy//:hwy",
|
||||
"@hwy//:thread_pool",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// Placeholder for internal header, do not modify.
|
||||
#include "compression/io.h"
|
||||
#include "gemma/gemma.h"
|
||||
#include "util/app.h"
|
||||
|
|
@ -41,7 +42,7 @@ std::pair<std::string, int> QueryModel(
|
|||
|
||||
// For both pre-trained and instruction-tuned models: prepend "<bos>" token
|
||||
// if needed.
|
||||
prompt.insert(prompt.begin(), 2);
|
||||
prompt.insert(prompt.begin(), gcpp::BOS_ID);
|
||||
std::string res;
|
||||
size_t total_tokens = 0;
|
||||
std::mt19937 gen;
|
||||
|
|
@ -89,6 +90,10 @@ class OutputJsonLogger {
|
|||
2b-it-sfp.sbs --prompt "..." --layers_output [path]
|
||||
*/
|
||||
int main(int argc, char** argv) {
|
||||
{
|
||||
// Placeholder for internal init, do not modify.
|
||||
}
|
||||
|
||||
gcpp::LoaderArgs loader(argc, argv);
|
||||
gcpp::InferenceArgs args(argc, argv); // inference
|
||||
gcpp::AppArgs app(argc, argv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue