Instructions to use replicate/moe-new-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/moe-new-models with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("replicate/moe-new-models") - Notebooks
- Google Colab
- Kaggle
Download fp8/vectorization.cuh from replicate/moe-new-models: direct link, hf CLI and curl.
- Browser
- Download file 778 Bytes
-
https://huggingface.co/replicate/moe-new-models/resolve/main/fp8/vectorization.cuh
- Command line
-
hf download hf://replicate/moe-new-models/fp8/vectorization.cuh
-
curl -L -o vectorization.cuh https://huggingface.co/replicate/moe-new-models/resolve/main/fp8/vectorization.cuh
778 Bytes
| /** | |
| * __device__ datatypes vectorized by 4 | |
| */ | |
| // Include both AMD and NVIDIA fp8 types to avoid circular import | |
| // TODO(luka/varun) use FP8_TYPE instead after refactoring | |
| namespace vllm { | |
| // Vectorization containers | |
| template <typename scalar_t> | |
| struct __align__(8) vec4_t { | |
| scalar_t x; | |
| scalar_t y; | |
| scalar_t z; | |
| scalar_t w; | |
| }; | |
| template <typename quant_type_t> | |
| struct __align__(4) q8x4_t { | |
| static_assert(std::is_same_v<quant_type_t, int8_t> || | |
| std::is_same_v<quant_type_t, c10::Float8_e4m3fn> || | |
| std::is_same_v<quant_type_t, c10::Float8_e4m3fnuz>); | |
| quant_type_t x; | |
| quant_type_t y; | |
| quant_type_t z; | |
| quant_type_t w; | |
| }; | |
| } // namespace vllm | |