mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Get radpajama to build
make -j8 o//third_party/radpajama/radpajama.com make -j8 o//third_party/radpajama/radpajama-chat.com This change gets the radpajama.mk config working. This package depends on THIRD_PARTY_GGML but it's configured to call ggjt_v1(), so that the library will provide the old quantizers. The ggml_quantize_chunk() API will now dispatch to older quantizers based on the configured version.
This commit is contained in:
parent
410c8785c9
commit
282dd8e7b7
36 changed files with 707 additions and 20995 deletions
26
third_party/ggml/common.cc
vendored
26
third_party/ggml/common.cc
vendored
|
@ -60,20 +60,20 @@ static bool is_integer_str(const char *s) {
|
|||
static std::string replace_all(std::string const& original,
|
||||
std::string const& before,
|
||||
std::string const& after) {
|
||||
// https://stackoverflow.com/a/7724536/1653720
|
||||
std::string retval;
|
||||
std::string::const_iterator end = original.end();
|
||||
std::string::const_iterator current = original.begin();
|
||||
std::string::const_iterator next =
|
||||
std::search(current, end, before.begin(), before.end());
|
||||
while (next != end) {
|
||||
// https://stackoverflow.com/a/7724536/1653720
|
||||
std::string retval;
|
||||
std::string::const_iterator end = original.end();
|
||||
std::string::const_iterator current = original.begin();
|
||||
std::string::const_iterator next =
|
||||
std::search(current, end, before.begin(), before.end());
|
||||
while (next != end) {
|
||||
retval.append(current, next);
|
||||
retval.append(after);
|
||||
current = next + before.size();
|
||||
next = std::search(current, end, before.begin(), before.end());
|
||||
}
|
||||
retval.append(current, next);
|
||||
retval.append(after);
|
||||
current = next + before.size();
|
||||
next = std::search(current, end, before.begin(), before.end());
|
||||
}
|
||||
retval.append(current, next);
|
||||
return retval;
|
||||
return retval;
|
||||
}
|
||||
|
||||
static bool append_file_to_prompt(const char *path, gpt_params & params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue