-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: dear teachers, how can i know the input after spu, thanks very much!!! #908
Comments
I think secretflow's documentation is clear |
thanks very much!! |
reveal can get the plain input, but how i can i get the secret shares. could you please give me some advice, thanks very much!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Type
Build/Install
Modules Involved
MPC protocol
Have you reproduced the bug with SPU HEAD?
Yes
Have you searched existing issues?
Yes
SPU Version
0.9.3.dev20241013
OS Platform and Distribution
Ubuntu 18.04.6 LTS
Python Version
3.9.20
Compiler Version
GCC11.2.0
Current Behavior?
For example, how can i know the model_params and input_token_ids, thanks very much!!!
def get_model_params():
pretrained_model = FlaxGPT2LMHeadModel.from_pretrained("gpt2")
return pretrained_model.params
def get_token_ids():
tokenizer = AutoTokenizer.from_pretrained("gpt2")
return tokenizer.encode('I enjoy walking with my cute dog', return_tensors='jax')
model_params = alice(get_model_params)()
input_token_ids = bob(get_token_ids)()
device = spu
model_params_, input_token_ids_ = model_params.to(device), input_token_ids.to(device)
output_token_ids = spu(text_generation)(input_token_ids_, model_params_)
Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: