Text Generation
Transformers
Safetensors
English
metadiffusion
diffusion-language-model
diffusion
transformer
language-model
autoregressive-conversion
experimental
research
150m
english
Instructions to use CodeSoft/MetaDiffusion-150M-exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CodeSoft/MetaDiffusion-150M-exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CodeSoft/MetaDiffusion-150M-exp")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("CodeSoft/MetaDiffusion-150M-exp", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CodeSoft/MetaDiffusion-150M-exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CodeSoft/MetaDiffusion-150M-exp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodeSoft/MetaDiffusion-150M-exp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CodeSoft/MetaDiffusion-150M-exp
- SGLang
How to use CodeSoft/MetaDiffusion-150M-exp with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CodeSoft/MetaDiffusion-150M-exp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodeSoft/MetaDiffusion-150M-exp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CodeSoft/MetaDiffusion-150M-exp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodeSoft/MetaDiffusion-150M-exp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CodeSoft/MetaDiffusion-150M-exp with Docker Model Runner:
docker model run hf.co/CodeSoft/MetaDiffusion-150M-exp
Add hfviewer architecture card
Browse filesEmbed the hfviewer architecture visualization card in README.md.
README.md
CHANGED
|
@@ -21,9 +21,9 @@ base_model:
|
|
| 21 |
|
| 22 |
<div align="center">
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
| 27 |
This model is for research and evaluation purposes only. Do not use in production environments.
|
| 28 |
</p>
|
| 29 |
|
|
@@ -35,6 +35,16 @@ MetaDiffusion-150M-exp is a diffusion language model created by converting the S
|
|
| 35 |
|
| 36 |
The model retains the original tokenizer while introducing diffusion-specific components, including timestep conditioning and a learned mask token.
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
| Specification | Value |
|
| 39 |
| ----------------- | --------------------------------------- |
|
| 40 |
| Architecture | `MetaDiffusionForCausalLM` |
|
|
@@ -83,7 +93,6 @@ Training schedule:
|
|
| 83 |
| Average Accuracy | 29.49% |
|
| 84 |
| Average Normalized Accuracy | 29.61% |
|
| 85 |
|
| 86 |
-
|
| 87 |
## Running the Model
|
| 88 |
|
| 89 |
This repository includes an `inference.py` script for sampling from the model.
|
|
@@ -135,4 +144,4 @@ This release is not instruction tuned and is not intended for production deploym
|
|
| 135 |
|
| 136 |
## Acknowledgements
|
| 137 |
|
| 138 |
-
MetaDiffusion is derived from the Supra-1.5-50M-Base-exp model. Credit goes to the Supra authors for the original autoregressive checkpoint that served as the initialization for this work. MetaDiffusion is released under the Apache-2.0 license in accordance with the licensing terms of the original Supra checkpoint.
|
|
|
|
| 21 |
|
| 22 |
<div align="center">
|
| 23 |
|
| 24 |
+
<h1>MetaDiffusion-150M-exp</h1>
|
| 25 |
|
| 26 |
+
<p>
|
| 27 |
This model is for research and evaluation purposes only. Do not use in production environments.
|
| 28 |
</p>
|
| 29 |
|
|
|
|
| 35 |
|
| 36 |
The model retains the original tokenizer while introducing diffusion-specific components, including timestep conditioning and a learned mask token.
|
| 37 |
|
| 38 |
+
## Architecture graph
|
| 39 |
+
|
| 40 |
+
<a href="https://hfviewer.com/CodeSoft/MetaDiffusion-150M-exp?utm_source=huggingface&utm_medium=embedded_model_card&utm_campaign=CodeSoft_MetaDiffusion-150M-exp_card" target="_blank" rel="noopener">
|
| 41 |
+
<img
|
| 42 |
+
src="https://hfviewer.com/api/card.svg?source=CodeSoft%2FMetaDiffusion-150M-exp&granularity=0"
|
| 43 |
+
alt="Architecture graph for CodeSoft/MetaDiffusion-150M-exp. Open in hfviewer"
|
| 44 |
+
width="100%"
|
| 45 |
+
/>
|
| 46 |
+
</a>
|
| 47 |
+
|
| 48 |
| Specification | Value |
|
| 49 |
| ----------------- | --------------------------------------- |
|
| 50 |
| Architecture | `MetaDiffusionForCausalLM` |
|
|
|
|
| 93 |
| Average Accuracy | 29.49% |
|
| 94 |
| Average Normalized Accuracy | 29.61% |
|
| 95 |
|
|
|
|
| 96 |
## Running the Model
|
| 97 |
|
| 98 |
This repository includes an `inference.py` script for sampling from the model.
|
|
|
|
| 144 |
|
| 145 |
## Acknowledgements
|
| 146 |
|
| 147 |
+
MetaDiffusion is derived from the Supra-1.5-50M-Base-exp model. Credit goes to the Supra authors for the original autoregressive checkpoint that served as the initialization for this work. MetaDiffusion is released under the Apache-2.0 license in accordance with the licensing terms of the original Supra checkpoint.
|