Files
zeekay 531fc57003 chore(brand): purge Zama refs across docs, README, configs — phase 1
Brand-only sweep. Touches READMEs, docs, package metadata, comments,
notebook markdown, requirements.txt files; does NOT yet touch Python
`concrete.*` imports (those are module-level dependencies requiring the
phase-2 Python module port from `concrete` → `torus`).

Substitutions applied:

  Concrete ML                  → TorusML
  concrete-ml                  → torus-ml
  Concrete-ML                  → Torus-ML
  concrete_ml                  → torus_ml
  zama-ai/concrete-ml          → luxfhe/ml-sdk
  zama-ai/concrete             → luxfhe/torus
  github.com/zama-ai           → github.com/luxfhe
  docs.zama.ai/concrete-ml     → docs.luxfhe.com/ml-sdk
  docs.zama.ai/concrete        → docs.luxfhe.com/torus
  Zama Concrete ML             → Lux TorusML
  Zama Concrete                → Lux Torus
  Zama tfhe-rs / Zama TFHE-rs  → Lux-FHE
  tfhe-rs / TFHE-rs            → Lux-FHE
  Zama fhEVM / fhEVM           → TorusEVM
  Concrete framework           → Torus framework
  Concrete compiler            → Torus compiler
  Concrete by Zama             → Torus by Lux
  the Zama team                → the Lux Industries team
  Zama's                       → Lux Industries'
  (Zama)                       → (Lux)
  CoFHE / Fhenix               → (removed)

LICENSE: original Zama copyright RETAINED per BSD-3-Clause-Clear §1-§2
requirements; Lux Industries modifications copyright added. Per §3 no
name of ZAMA used to endorse the derived work — product marketed
exclusively as TorusML.

README image URLs migrated to github.com/luxfhe/ml-sdk/assets to break
the dependency on Zama's CDN.

Hit count: 350 → 295. Residual hits are Python `from concrete.fhe import`
imports referencing the upstream Zama `concrete` PyPI package; these
require module-level port (phase 2):

  Phase 2 plan:
    1. Fork zama-ai/concrete (the Python compiler) to luxfhe/torus
    2. Rename Python module `concrete` → `torus`; PyPI publish as `torus-fhe`
    3. Update ml-sdk imports from `concrete.fhe` → `torus.fhe`, etc.
    4. Wire `torus.compiler` GPU dispatch through `luxcpp/gpu` vtbl
       (lux-private/gpu-kernels for CUDA/Metal/WebGPU/FPGA targets)
    5. Port concrete-cuda + concrete-mlir kernels to
       lux-private/gpu-kernels/{cuda,metal,wgsl}/ckks/ (matrix-vector
       mul, rescale, rotate, bootstrap for TorusML inference)

  Phase 3 plan (kernels):
    - CKKS/BGV/BFV GPU kernels in lux-private/gpu-kernels/
      (currently only TFHE PBS / keyswitch / blind-rotate exist)
    - FPGA bitstreams in lux-private/fpga/ (currently scaffold only)

Phase 1 = docs/branding sweep. PR not opened; user reviews and merges.
2026-05-29 13:53:42 -07:00

2.3 KiB

Deployment

In this folder we show how to deploy a simple TorusML model that does breast cancer classification, either through Docker or Amazon Web Services.

Get started

To run this example on AWS you will also need to have the AWS CLI properly setup on your system. To do so please refer to AWS documentation. One can also run this example locally using Docker, or just by running the scripts locally.

On the developer machine:

  1. To train your model you can

    • use train_with_docker.sh to use Docker (recommended way),
    • or, only if you know what you're doing and will manage synchronisation between versions, use python train.py

    This will train a model and serialize the FHE circuit in a new folder called ./dev.

On the server machine:

  1. Copy the './dev' directory from the developer machine.
  2. If you need to delete existing Dockers: docker rm -f $(docker ps -a -q)
  3. Launch the server via:
python ../server/deploy_to_docker.py --path-to-model ./dev

You will finally see some

INFO: Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)

which means the server is ready to server, on Port 5000.

On the client machine:

If you go for a Docker part on the client side:
  1. Launch the build_docker_client_image.py to build a client Docker image.
  2. Run the client with client.sh script. This will run the container in interactive mode.
  3. Then, in this Docker, you can launch the client script to interact with the server:
URL="<my_url>" python client.py

where <my_url> is the content of the url.txt file (if you don't set URL, the default is 0.0.0.0; this defines the IP to use when running server in Docker on localhost).

If you go for client side done in Python:

  1. Prepare the client side:
python3.8 -m venv .venvclient
source .venvclient/bin/activate
pip install -r client_requirements.txt
  1. Run the client script:
URL="http://localhost:8888" python client.py

And here it is! Whether you use Docker or Python for the client side, you deployed a TorusML model and ran an inference using Fully Homormophic Encryption. In particular, you can see that the FHE predictions are correct.