MCPcopy Create free account
hub / github.com/RWKV/rwkv.cpp / eval

Method eval

python/rwkv_cpp/rwkv_cpp_model.py:85–148  ·  view source on GitHub ↗

Evaluates the model for a single token. In case of any error, this method will throw an exception. Parameters ---------- token : int Index of next token to be seen by the model. Must be in range 0 <= token < n_vocab. state_in : Optional[N

(
            self,
            token: int,
            state_in: Optional[NumpyArrayOrPyTorchTensor],
            state_out: Optional[NumpyArrayOrPyTorchTensor] = None,
            logits_out: Optional[NumpyArrayOrPyTorchTensor] = None,
            use_numpy: bool = False
    )

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

Calls 5

_detect_numpy_usageMethod · 0.95
_validate_tensorMethod · 0.95
_get_data_ptrMethod · 0.95
_zeros_float32Method · 0.95
rwkv_evalMethod · 0.80

Tested by

no test coverage detected