Narsil's picture
Narsil HF staff
Small showcase for xformers.
1378ccc unverified
raw history blame
No virus
404 Bytes
import gradio as gr
import platform
import torch
from xformers import ops
q = torch.zeros((2, 2, 2, 2)).cuda()
k = torch.zeros((2, 2, 2, 2)).cuda()
v = torch.zeros((2, 2, 2, 2)).cuda()
out = ops.memory_efficient_attention(q, k, v)
print(out)
print(platform.libc_ver())
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()