MCPcopy Index your code
hub / github.com/YunwenTechnology/QueryGeneration / sample_step

Function sample_step

train/modeling.py:655–697  ·  view source on GitHub ↗

Helper function that samples from grover for a single step :param tokens: [batch_size, n_ctx_b] tokens that we will predict from :param ignore_ids: [n_vocab] mask of the tokens we don't want to predict :param news_config: config for the GroverModel :param batch_size: batch size

(tokens, ignore_ids, news_config, batch_size=1, p_for_topp=0.95, cache=None, do_topk=False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

initialize_from_contextFunction · 0.85
bodyFunction · 0.85

Calls 4

get_shape_listFunction · 0.90
GroverModelClass · 0.85
_top_k_sampleFunction · 0.85
_top_p_sampleFunction · 0.85

Tested by

no test coverage detected