MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / logprobs_async

Method logprobs_async

trinity/common/models/model.py:538–542  ·  view source on GitHub ↗

Calculate the logprobs of the given tokens in async.

(
        self, tokens: List[int], temperature: Optional[float] = None
    )

Source from the content-addressed store, hash-verified

536 return ray.get(self.model.logprobs.remote(tokens, temperature=temperature))
537
538 async def logprobs_async(
539 self, tokens: List[int], temperature: Optional[float] = None
540 ) -> Tensor:
541 """Calculate the logprobs of the given tokens in async."""
542 return await self.model.logprobs.remote(tokens, temperature=temperature)
543
544 def convert_messages_to_experience(
545 self,

Callers 2

run_asyncMethod · 0.80
test_generateMethod · 0.80

Calls 1

remoteMethod · 0.80

Tested by 1

test_generateMethod · 0.64