Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions engine/src/poly/inkling2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,11 @@ DsScreen Inkling2::ds_screen() const {
// mixed into each drafter layer's keys and values at the rows' positions and the Markov head's context.
void Inkling2::ds_commit(int n) {
const size_t E = (size_t) n_embd_;
output_rows(0, n, ds_tap_ + 3 * (size_t) rows_ * E);
output_rows(0, n, ds_tap_ + 3 * (size_t) buf_rows_ * E);
const DsPos p{recording_ ? at_ : nullptr, (long long) pos_};
DsMix m;
m.tap = ds_tap_;
m.tap_stride = (size_t) rows_ * E;
m.tap_stride = (size_t) buf_rows_ * E;
m.alpha = ds_alpha_;
for (int l = 0; l < 3; ++l) m.norm[l] = ds_[(size_t) l].dflare;
m.norm[3] = ds_mnorm_;
Expand Down Expand Up @@ -732,7 +732,7 @@ bool Inkling2::scores_apart() const {
#ifdef STRATA_VMM_RELEASE_WITH_ADDRESSES
return false;
#else
return !ds_file_ && !freeze_experts_asked_ && mmq_ && vmm_ && !split_ && rows_ >= kStageRows;
return !freeze_experts_asked_ && mmq_ && vmm_ && !split_ && rows_ >= kStageRows;
#endif
}

Expand Down Expand Up @@ -1192,7 +1192,7 @@ void Inkling2::layer_head(Layer& L, int il, int n) {
if (ds_file_) { // the drafter's features: the inputs of three layer runs
const int visit = visit_of(il, pass_of(il));
for (int k = 0; k < 3; ++k)
if (visit == ds_visit_[k]) copy_rows(r_, ds_tap_ + (size_t) k * rows_ * n_embd_, n);
if (visit == ds_visit_[k]) copy_rows(r_, ds_tap_ + (size_t) k * buf_rows_ * n_embd_, n);
}
Slot& S = slots_[(size_t) slot_of(il, pass_of(il))];
const size_t ne = (size_t) n * n_embd_;
Expand Down
4 changes: 2 additions & 2 deletions engine/src/poly/inkling2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class Inkling2 final : public Engine {
void alloc_caches() override;
void assign_scratch() override;
// A call of a few tokens keeps a scratch of its own, and a prompt batch's is lent to the expert cache between
// prompts (Engine::use_scratch()). Not with the drafter, whose features are a whole call's rows, nor on ROCm on
// Linux, nor where nothing would be lent: the experts frozen, or every one of them in VRAM (inkling2.cpp).
// prompts (Engine::use_scratch()); the drafter's features are strided by the layout's rows (buf_rows_). Not on
// ROCm on Linux, nor where nothing would be lent: the experts frozen, or every one of them in VRAM (inkling2.cpp).
bool scratch_layouts() const override;
bool scores_apart() const; ///< the attention's scores outside the scratch, for its two layouts to share
bool every_expert_fits() const;
Expand Down
Loading