Trying to shrink the copy+paste code and do more code sharing between backend model impl.

This commit is contained in:
Adam Treat
2023-06-01 23:15:58 -04:00
committed by AT
parent 031d7149a7
commit a41bd6ac0a
9 changed files with 41 additions and 96 deletions

View File

@@ -25,13 +25,10 @@ public:
std::function<bool(int32_t, const std::string&)> responseCallback,
std::function<bool(bool)> recalculateCallback,
PromptContext &ctx) override;
bool evalTokens(PromptContext &ctx, const std::vector<int32_t> &tokens) override;
void setThreadCount(int32_t n_threads) override;
int32_t threadCount() const override;
protected:
void recalculateContext(PromptContext &promptCtx,
std::function<bool(bool)> recalculate) override;
private:
GPTJPrivate *d_ptr;
};