ndif-team / nnsight

The nnsight package enables interpreting and manipulating the internals of deep learned models.
https://nnsight.net/
MIT License
399 stars 37 forks source link

tracer has a logged_request arg, remote backend no execute #236

Closed cadentj closed 3 weeks ago

cadentj commented 1 month ago
# %%

from nnsight import LanguageModel

model = LanguageModel("gpt2")

with model.trace("hello", remote=True) as tracer:

    # Do some stuff...

    for layer in model.transformer.h:
        layer.output *= 1

    model.output.save()

# %%

print(type(tracer.logged_request))
print(tracer.logged_request)