Skip to content

Commit

Permalink
Preparing for version 0.5 and checking CI (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil authored Jan 24, 2025
1 parent 7cec62e commit 2fd6e9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions optimum_benchmark/backends/pytorch/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ def forward(self, inputs: Dict[str, Any], kwargs: Dict[str, Any]) -> OrderedDict

@torch.inference_mode()
def prefill(self, inputs: Dict[str, Any], kwargs: Dict[str, Any]) -> OrderedDict:
assert (
kwargs.get("max_new_tokens") == kwargs.get("min_new_tokens") == 1
), "For prefilling, max_new_tokens and min_new_tokens must be equal to 1"
assert kwargs.get("max_new_tokens") == kwargs.get("min_new_tokens") == 1, (
"For prefilling, max_new_tokens and min_new_tokens must be equal to 1"
)
return self.pretrained_model.generate(**inputs, **kwargs)

@torch.inference_mode()
Expand Down
2 changes: 1 addition & 1 deletion optimum_benchmark/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.5.0.dev0"
__version__ = "0.5.0"

0 comments on commit 2fd6e9f

Please sign in to comment.