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

Function _create_fake_logits

tests/layers/test_speculative_sampler.py:37–39  ·  view source on GitHub ↗
(batch_size: int, vocab_size: int)

Source from the content-addressed store, hash-verified

35
36
37def _create_fake_logits(batch_size: int, vocab_size: int) -> paddle.Tensor:
38 fake_logits = paddle.rand(shape=[batch_size, vocab_size], dtype="float32")
39 return fake_logits
40
41
42def _create_penalty_tensor(batch_size: int, penalty_value: float) -> paddle.Tensor:

Callers 4

test_speculative_samplerFunction · 0.70
test_mtp_samplerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected