mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-13 02:19:41 +00:00
sync with sd.cpp
This commit is contained in:
parent
e5af9b5ea9
commit
186227fc26
8 changed files with 234 additions and 82 deletions
|
@ -795,9 +795,9 @@ struct T5Runner : public GGMLRunner {
|
|||
|
||||
void compute(const int n_threads,
|
||||
struct ggml_tensor* input_ids,
|
||||
struct ggml_tensor* attention_mask,
|
||||
ggml_tensor** output,
|
||||
ggml_context* output_ctx = NULL,
|
||||
struct ggml_tensor* attention_mask = NULL) {
|
||||
ggml_context* output_ctx = NULL) {
|
||||
auto get_graph = [&]() -> struct ggml_cgraph* {
|
||||
return build_graph(input_ids, attention_mask);
|
||||
};
|
||||
|
@ -966,7 +966,7 @@ struct T5Embedder {
|
|||
struct ggml_tensor* out = NULL;
|
||||
|
||||
int t0 = ggml_time_ms();
|
||||
model.compute(8, input_ids, &out, work_ctx);
|
||||
model.compute(8, input_ids, NULL, &out, work_ctx);
|
||||
int t1 = ggml_time_ms();
|
||||
|
||||
print_ggml_tensor(out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue