|
16 | 16 |
|
17 | 17 | llama_context::llama_context( |
18 | 18 | const llama_model & model, |
19 | | - const llama_context_params & params) : |
20 | | - model (model) { |
| 19 | + const llama_context_params & params, |
| 20 | + llama_graph_type gtype) : |
| 21 | + llama_graph_i(gtype), |
| 22 | + model(model) { |
21 | 23 | LLAMA_LOG_INFO("%s: constructing llama_context\n", __func__); |
22 | 24 |
|
23 | 25 | t_start_us = model.t_start_us; |
@@ -2279,8 +2281,9 @@ size_t llama_context::state_seq_set_data(llama_io_read_i & io, llama_seq_id seq_ |
2279 | 2281 |
|
2280 | 2282 | llama_context_kv_self::llama_context_kv_self( |
2281 | 2283 | const llama_model & model, |
2282 | | - const llama_context_params & params) : |
2283 | | - llama_context(model, params), |
| 2284 | + const llama_context_params & params, |
| 2285 | + llama_graph_type gtype) : |
| 2286 | + llama_context(model, params, gtype), |
2284 | 2287 | kv_self(model.hparams) { |
2285 | 2288 | LLAMA_LOG_INFO("%s: constructing llama_context_kv_self\n", __func__); |
2286 | 2289 |
|
@@ -3750,8 +3753,9 @@ size_t llama_context_kv_self::state_seq_set_data(llama_io_read_i & io, llama_seq |
3750 | 3753 |
|
3751 | 3754 | llama_context_recurrent::llama_context_recurrent( |
3752 | 3755 | const llama_model & model, |
3753 | | - const llama_context_params & params) : |
3754 | | - llama_context(model, params), |
| 3756 | + const llama_context_params & params, |
| 3757 | + llama_graph_type gtype) : |
| 3758 | + llama_context(model, params, gtype), |
3755 | 3759 | kv_self(model.hparams) { |
3756 | 3760 | LLAMA_LOG_INFO("%s: constructing llama_context_recurrent\n", __func__); |
3757 | 3761 |
|
@@ -4619,6 +4623,22 @@ size_t llama_context_recurrent::state_seq_set_data(llama_io_read_i & io, llama_s |
4619 | 4623 | return io.n_bytes(); |
4620 | 4624 | } |
4621 | 4625 |
|
| 4626 | +// |
| 4627 | +// llama_context_enc_dec |
| 4628 | +// |
| 4629 | + |
| 4630 | +llama_context_enc_dec::llama_context_enc_dec( |
| 4631 | + const llama_model & model, |
| 4632 | + const llama_context_params & params) : |
| 4633 | + llama_context(model, params, LLAMA_GRAPH_TYPE_ENCODER), |
| 4634 | + ctx_dec(model, params, LLAMA_GRAPH_TYPE_DECODER) { |
| 4635 | + LLAMA_LOG_INFO("%s: constructing llama_context_enc_dec\n", __func__); |
| 4636 | +} |
| 4637 | + |
| 4638 | +llama_context_enc_dec::~llama_context_enc_dec() { |
| 4639 | + LLAMA_LOG_INFO("%s: destructing llama_context_enc_dec\n", __func__); |
| 4640 | +} |
| 4641 | + |
4622 | 4642 | // |
4623 | 4643 | // interface implementation |
4624 | 4644 | // |
|
0 commit comments