REST APIs, web interfaces, and deployment infrastructure built to expose research models to end users at CERIST.
#react
Content tagged with "react"
def prune_transformer(model, amount=0.3):
for name, module in model.named_modules():
if isinstance(module, torch.nn.Linear):
prune.l1_unstructured(module, name='weight', amount=amount)
prune.remove(module, 'weight')
return model
# Efficient Multilingual NMT
class LightTranslator(nn.Module):
def __init__(self, vocab_size, d_model=512):
super().__init__()
self.encoder = TransformerEncoder(d_model)
self.decoder = TransformerDecoder(d_model)
def forward(self, src, tgt):
memory = self.encoder(src)
return self.decoder(tgt, memory) Content tagged with "react"
REST APIs, web interfaces, and deployment infrastructure built to expose research models to end users at CERIST.