Skip to content

How to get and modify weights between activated neurons? #2654

Answered by KerfuffleV2
unwnstr asked this question in Q&A
Discussion options

You must be logged in to vote

This seems like it will be very, very hard to pull off in a way that's better than approaching it from the token sampling angle. You'll need a deep knowledge of the specific model's architecture.

It's not clear exactly what you mean by neurons here. The model is composed of a bunch of tensors, and some of them are stacked in layers. If you use the llama.cpp API you can manage running each layer and such on your own and do stuff like inspect the tensors between layers.

You can possibly change values in the tensors (or in the state). It's probably going to be pretty hairy if you're running in GPU mode since you'd have to manage getting the changes to the GPU. In CPU mode, this may work unle…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@unwnstr
Comment options

Answer selected by unwnstr
Comment options

You must be logged in to vote
1 reply
@unwnstr
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants