Instructions to use replicate/flashinfer-draft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/flashinfer-draft with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("replicate/flashinfer-draft") - Notebooks
- Google Colab
- Kaggle
| /* | |
| * Copyright (c) 2025 by FlashInfer team. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and | |
| * limitations under the License. | |
| */ | |
| namespace flashinfer { | |
| namespace logging { | |
| inline void set_log_level(spdlog::level::level_enum lvl) { | |
| auto fmt = "[%Y-%m-%d %H:%M:%S.%f] [%n] [%^%l%$] %v"; | |
| auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>(); | |
| console_sink->set_pattern(fmt); | |
| console_sink->set_level(lvl); | |
| spdlog::set_default_logger(std::make_shared<spdlog::logger>("flashinfer", console_sink)); | |
| } | |
| } // namespace logging | |
| } // namespace flashinfer | |