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

Method eval_sequence

python/rwkv_cpp/rwkv_cpp_model.py:150–223  ·  view source on GitHub ↗

Evaluates the model for a sequence of tokens. NOTE ON GGML NODE LIMIT ggml has a hard-coded limit on max amount of nodes in a computation graph. The sequence graph is built in a way that quickly exceedes this limit when using large models and/or large sequence leng

(
            self,
            tokens: List[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

nothing calls this directly

Calls 5

_detect_numpy_usageMethod · 0.95
_validate_tensorMethod · 0.95
_get_data_ptrMethod · 0.95
_zeros_float32Method · 0.95
rwkv_eval_sequenceMethod · 0.80

Tested by

no test coverage detected