MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _create_tokens_tensor

Function _create_tokens_tensor

tests/layers/test_sampler.py:46–51  ·  view source on GitHub ↗
(
    batch_size: int,
    max_seq_len: int,
)

Source from the content-addressed store, hash-verified

44
45
46def _create_tokens_tensor(
47 batch_size: int,
48 max_seq_len: int,
49) -> paddle.Tensor:
50 pre_token_ids = paddle.full(shape=[batch_size, max_seq_len], fill_value=-1, dtype="int64")
51 return pre_token_ids
52
53
54def _create_default_sampling_metadata(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected