py::class_<BC_BlockSparseMLP, std::shared_ptr<BC_BlockSparseMLP>>(m, "BC_BlockSparseMLP").def
(
    py::init<
        at::Tensor,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        c10::optional<at::Tensor>,
        c10::optional<at::Tensor>,
        at::Tensor,
        at::Tensor,
        int,
        int,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        int,
        bool,
        bool,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        int,
        bool,
        bool,
        at::Tensor,
        at::Tensor,
        at::Tensor,
        int,
        bool,
        bool,
        bool,
        bool,
        std::shared_ptr<BC_GatedMLP>,
        std::shared_ptr<BC_LinearFP16>,
        float,
        std::vector<std::shared_ptr<BC_LinearEXL3>>,
        std::vector<std::shared_ptr<BC_LinearEXL3>>,
        std::vector<std::shared_ptr<BC_LinearEXL3>>,
        at::Tensor,
        at::Tensor,
        at::Tensor
    >(),
    py::arg("yh2"),
    py::arg("yh"),
    py::arg("interm_gu"),
    py::arg("interm_g"),
    py::arg("interm_u"),
    py::arg("interm_a"),
    py::arg("interm_a2"),
    py::arg("out_d"),
    py::arg("out_d2"),
    py::arg("out_d_sh"),
    py::arg("z"),
    py::arg("dq_temp_up"),
    py::arg("dq_temp_down"),
    py::arg("min_expert"),
    py::arg("max_expert"),
    py::arg("gate_ptrs_trellis"),
    py::arg("gate_ptrs_suh"),
    py::arg("gate_ptrs_svh"),
    py::arg("gate_K"),
    py::arg("gate_mcg"),
    py::arg("gate_mul1"),
    py::arg("up_ptrs_trellis"),
    py::arg("up_ptrs_suh"),
    py::arg("up_ptrs_svh"),
    py::arg("up_K"),
    py::arg("up_mcg"),
    py::arg("up_mul1"),
    py::arg("down_ptrs_trellis"),
    py::arg("down_ptrs_suh"),
    py::arg("down_ptrs_svh"),
    py::arg("down_K"),
    py::arg("down_mcg"),
    py::arg("down_mul1"),
    py::arg("act_silu"),
    py::arg("act_gelu"),
    py::arg("shared_experts"),
    py::arg("shared_gate"),
    py::arg("act_limit"),
    py::arg("gates"),
    py::arg("ups"),
    py::arg("downs"),
    py::arg("gu_trellis_ptr"),
    py::arg("gu_suh_ptr"),
    py::arg("gu_svh_ptr")
)
.def("run_bsz1", &BC_BlockSparseMLP::run_bsz1)
.def("run_single_expert", &BC_BlockSparseMLP::run_single_expert)
.def("run_single_expert_dq", &BC_BlockSparseMLP::run_single_expert_dq);
