mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
15 lines
334 B
Python
15 lines
334 B
Python
![]() |
from typing import Any
|
||
|
|
||
|
import torch
|
||
|
|
||
|
|
||
|
class VisualGLMPostProcessor:
|
||
|
""""Post processor for VisualGLM on MMBench."""
|
||
|
|
||
|
def __init__(self) -> None:
|
||
|
pass
|
||
|
|
||
|
def __call__(self, output_token: torch.tensor, tokenizer: Any,
|
||
|
input_len: int) -> str:
|
||
|
return tokenizer.decode(output_token[input_len:])
|