Instructions to use WhaletechAI/W1-4B-dLLM-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WhaletechAI/W1-4B-dLLM-Base with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("WhaletechAI/W1-4B-dLLM-Base", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| """Shared sampler types for the open-source release.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass, field | |
| from typing import Callable | |
| from torch import Tensor | |
| class SamplerState: | |
| step: int | |
| total_steps: int | |
| t: float | |
| x_t: Tensor | |
| logits: Tensor | |
| remain_before: int | |
| remain_after: int | |
| selected: int | |
| prefix_len: int | |
| mask_token_id: int | |
| metadata: dict = field(default_factory=dict) | |
| StepCallback = Callable[[SamplerState], None] | |