Skip to content
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

chore: add load tfhers params from dict #1196

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andrei-stoian-zama
Copy link
Contributor

No description provided.

@cla-bot cla-bot bot added the cla-signed label Jan 14, 2025
@andrei-stoian-zama andrei-stoian-zama force-pushed the chore/add_load_tfhers_params_dict branch from fa8e17a to 892b6d9 Compare January 14, 2025 13:02
Copy link
Member

@youben11 youben11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the API, but I don't think we should update the example.

Comment on lines 19 to 38
PARAMS_DICT = {
"lwe_dimension": 902,
"glwe_dimension": 1,
"polynomial_size": 4096,
"lwe_noise_distribution": {"Gaussian": {"std": 1.0994794733558207e-6, "mean": 0.0}},
"glwe_noise_distribution": {"Gaussian": {"std": 2.168404344971009e-19, "mean": 0.0}},
"pbs_base_log": 15,
"pbs_level": 2,
"ks_base_log": 3,
"ks_level": 6,
"message_modulus": 4,
"carry_modulus": 8,
"max_noise_level": 10,
"log2_p_fail": -64.084,
"ciphertext_modulus": {"modulus": 0, "scalar_bits": 64},
"encryption_key_choice": "Big",
}

tfhers_type = tfhers.get_type_from_params_dict(
PARAMS_DICT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't update the example. There are explained steps to generate the file with TFHE-rs parameters in Rust. The motivation for that was to remove parameters completely from the Python file, but this is re-introducing them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, makes sense

Copy link
Member

@youben11 youben11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! You can just green the CI and merge. It is failing for two reasons currently:

  1. commit message compliance: second commit is not compliant, but I guess you could squash it locally and force-push
  2. API has changed, so docs need to be updated: you can either run the docgen locally, but this might become a nightmare depending on what you use locally. Or you can just apply the patch provided in the logs.

Thanks @andrei-stoian-zama

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants