mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix build, disable gesture input pending model update
This commit is contained in:
parent
39b46adca2
commit
ebb70b9c12
@ -18,5 +18,5 @@
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<bool name="config_gesture_input_enabled_by_build_config">true</bool>
|
||||
<bool name="config_gesture_input_enabled_by_build_config">false</bool>
|
||||
</resources>
|
||||
|
@ -271,7 +271,7 @@ struct LanguageModelState {
|
||||
|
||||
if(num_added == 0){
|
||||
AKLOGE("Somehow a token mix had 0 weight for everything");
|
||||
assert(false);
|
||||
ASSERT(false);
|
||||
}
|
||||
|
||||
embeds.insert(embeds.end(), mix_f.begin(), mix_f.end());
|
||||
@ -338,11 +338,11 @@ struct LanguageModelState {
|
||||
|
||||
TIME_END(DecodeXBC)
|
||||
|
||||
assert(size == prompt.size() + n_tokens + 1);
|
||||
assert(size == prompt.size() + (embeds.size() / n_embd) + 1);
|
||||
ASSERT(size == prompt.size() + n_tokens + 1);
|
||||
ASSERT(size == prompt.size() + (embeds.size() / n_embd) + 1);
|
||||
} else {
|
||||
assert(size == prompt.size());
|
||||
assert(head == prompt_ff.first.size() - 1);
|
||||
ASSERT(size == prompt.size());
|
||||
ASSERT(head == prompt_ff.first.size() - 1);
|
||||
}
|
||||
|
||||
AKLOGI("-- Decode");
|
||||
|
@ -84,7 +84,7 @@ LanguageModel *LlamaAdapter::createLanguageModel(const std::string &paths) {
|
||||
adapter->embeddings.resize(llama_n_embd(adapter->model) * llama_n_vocab(adapter->model));
|
||||
|
||||
auto tensor = llama_get_model_tensor(adapter->model, "token_embd.weight");
|
||||
assert(tensor);
|
||||
ASSERT(tensor);
|
||||
|
||||
if(tensor->type != GGML_TYPE_F32) {
|
||||
ggml_internal_get_type_traits(tensor->type).to_float(tensor->data,
|
||||
|
@ -36,7 +36,7 @@ namespace insmat {
|
||||
|
||||
AK_FORCE_INLINE float section(float h, float r = 1) // returns the positive root of intersection of line y = h with circle centered at the origin and radius r
|
||||
{
|
||||
assert(r >= 0); // assume r is positive, leads to some simplifications in the formula below (can factor out r from the square root)
|
||||
ASSERT(r >= 0); // assume r is positive, leads to some simplifications in the formula below (can factor out r from the square root)
|
||||
return (h < r)? sqrt(r * r - h * h) : 0; // http://www.wolframalpha.com/input/?i=r+*+sin%28acos%28x+%2F+r%29%29+%3D+h
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ namespace insmat {
|
||||
else
|
||||
return area(x0, x1, 0, -y0, r) + area(x0, x1, 0, y1, r); // the box is both above and below, divide it to two boxes and go again
|
||||
} else {
|
||||
assert(y1 >= 0); // y0 >= 0, which means that y1 >= 0 also (y1 >= y0) because of the swap at the beginning
|
||||
ASSERT(y1 >= 0); // y0 >= 0, which means that y1 >= 0 also (y1 >= y0) because of the swap at the beginning
|
||||
return area(x0, x1, y0, r) - area(x0, x1, y1, r); // area of the lower box minus area of the higher box
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user