This is the result of running `./mach vendor third_party/llama.cpp/moz.yaml --patch none && ./mach vendor third_party/llama.cpp/moz.yaml --patch only`. This vendors the CMakeLists.txt files, and parses them, generating sources.mozbuild. Some custom code runs after that, but things have been stable for 3 or 4 updates in the last few weeks. This runs in a separate process (Inference) that has a similar sandbox to a content process. Only CPU inference is enabled, hardware acceleration will come at a later stage, and after sandboxing work. A few patches were needed, most notably to work around the lack of exceptions in Firefox, and to not use functions from libstdc++ that are too recent. Differential Revision: https://phabricator.services.mozilla.com/D253058
17 lines
617 B
Diff
17 lines
617 B
Diff
diff --git a/src/llama-sampling.cpp b/src/llama-sampling.cpp
|
|
index dd1d9eee52..41081da1ba 100644
|
|
--- a/src/llama-sampling.cpp
|
|
+++ b/src/llama-sampling.cpp
|
|
@@ -305,9 +305,10 @@
|
|
}
|
|
|
|
static uint32_t get_rng_seed(uint32_t seed) {
|
|
+
|
|
if (seed == LLAMA_DEFAULT_SEED) {
|
|
// use system clock if std::random_device is not a true RNG
|
|
- static bool is_rd_prng = std::random_device().entropy() == 0;
|
|
+ static bool is_rd_prng = true;//std::random_device().entropy() == 0;
|
|
if (is_rd_prng) {
|
|
return (uint32_t) std::chrono::system_clock::now().time_since_epoch().count();
|
|
}
|