We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87616f0 commit 226251eCopy full SHA for 226251e
examples/embedding/embedding.cpp
@@ -89,6 +89,13 @@ int main(int argc, char ** argv) {
89
common_init();
90
91
params.embedding = true;
92
+
93
+ // utilize the full context
94
+ if (params.n_batch < params.n_ctx) {
95
+ LOG_WRN("%s: setting batch size to %d\n", __func__, params.n_ctx);
96
+ params.n_batch = params.n_ctx;
97
+ }
98
99
// For non-causal models, batch size must be equal to ubatch size
100
params.n_ubatch = params.n_batch;
101
@@ -134,7 +141,6 @@ int main(int argc, char ** argv) {
134
141
135
142
// max batch size
136
143
const uint64_t n_batch = params.n_batch;
137
- GGML_ASSERT(params.n_batch >= params.n_ctx);
138
144
139
145
// tokenize the prompts and trim
140
146
std::vector<std::vector<int32_t>> inputs;
0 commit comments