dachengli1 / mpcformer Goto Github PK
View Code? Open in Web Editor NEW(ICLR 2023 Spotlight) MPCFormer: fast, performant, and private transformer inference with MPC
(ICLR 2023 Spotlight) MPCFormer: fast, performant, and private transformer inference with MPC
Hello, thanks for a great job.
I have a question about the results in Table 2 and 4.
Are the acc results in these tables obtained by conducting MPC inference on encrypted data or obtained on original test data?
Do you test how mpc process affects acc performance?
As is written in your article:.“p” stands for using weights in T as initialization, “d” stands for applying knowledge distillation with T as the teacher.
My question is:Does “using weights in T as initialization” mean fine-tuned model? E.g.”p” stands for “fine-tuning”, namely, 1.MPCBert-B stands for the most basic pre-trained transformer, 2.MPCBert-Bw/o{d} stands for applying KD on the most basic pre-trained transformer, 3. MPCBert-Bw/o{p,d} stands for applying KD on fine-tuned transformer?
Hey, @DachengLi1 . I try to reproduce the experiment results reported in the paper and found some mismatches.
After reading and studing your code, It seems that the secure inference stege right now is not implemented?
By finishing MPCformer stege, I can only get a great model, with replacing the softmax and activation, but the model now can't be directly applied to your code for further research? is secure inference has been implemented?
I am looking forward to your reply !
In the CrypTen-based MPCFormer, such as MPC-Bert, I noticed that the LayerNorm is replaced by BatchNorm (due to CrypTen does not support LayerNorm now). Will this modification influence Bert's performance (e.g., accuracy)? Due to the source code did not give the model-loading scripts, it might be difficult for me to check it in experiments. Thanks for your help.
Following the instructions in your README file, I noticed that the code snippets provided for testing with CrypTen seem to only initialize weights randomly without leveraging any pre-trained models. Could you please clarify how the distilled models are supposed to be applied in this context?
Additionally, I am puzzled by the accuracy testing mentioned in your paper. Specifically, are the reported accuracy figures obtained through secure computation in CrypTen between two parties? If so, the time expenditure seems astonishingly high.
I believe understanding these aspects would greatly enhance my comprehension of the practical applications of your work and its implications for secure and efficient model inference.
Thank you very much for addressing my inquiries.
Hey, @DachengLi1 . I try to run the distillation experiments for Roberta-base model. However, I notice that you have commented out TinyRobretaxxx model. I try to run this model and several errors show up, e.g., is_torch_greater_than_1_6
is missing, self.position_embeddings = nn.Embedding( config.max_position_embeddings, config.hidden_size, padding_idx=self.padding_idx )
incurs error: `embedding(): argument 'indices' (position 2) must be Tensor, not NoneType
Do you have any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.