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:
Justine Tunney 2023-05-13 20:44:36 -07:00
parent 410c8785c9
commit 282dd8e7b7
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
36 changed files with 707 additions and 20995 deletions

View file

@ -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) {