MCPcopy Create free account
hub / github.com/WaveSpeedAI/QuantumAttention / attention_fn

Function attention_fn

tests/test_interface.py:104–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 value = torch.randn(B, H, S_KV, D, dtype=dtype, device=device)
103
104 def attention_fn():
105 if is_fp8:
106 fp8_attention(query, key, value, is_causal)
107 else:
108 vanilla_attention(query, key, value, is_causal)
109
110 try:
111 attention_fn()

Callers 1

Calls 2

vanilla_attentionFunction · 0.85
fp8_attentionFunction · 0.70

Tested by

no test coverage detected