Text Generation
Transformers
Safetensors
English
expivme_diffusion
feature-extraction
language-model
transformer
rope
swiglu
diffusion
masked-diffusion
discrete-diffusion
from-scratch
tiny
small
experimental
custom_code
Instructions to use IvmeLabs/ExpIvme-DiffusionConversate-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IvmeLabs/ExpIvme-DiffusionConversate-v1", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("IvmeLabs/ExpIvme-DiffusionConversate-v1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IvmeLabs/ExpIvme-DiffusionConversate-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IvmeLabs/ExpIvme-DiffusionConversate-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IvmeLabs/ExpIvme-DiffusionConversate-v1
- SGLang
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1 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 "IvmeLabs/ExpIvme-DiffusionConversate-v1" \ --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": "IvmeLabs/ExpIvme-DiffusionConversate-v1", "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 "IvmeLabs/ExpIvme-DiffusionConversate-v1" \ --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": "IvmeLabs/ExpIvme-DiffusionConversate-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1 with Docker Model Runner:
docker model run hf.co/IvmeLabs/ExpIvme-DiffusionConversate-v1
Add missing configuration_expivme_diffusion.py (auto_map target)
Browse files
configuration_expivme_diffusion.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""HuggingFace Transformers config for ExpIvme-DiffusionConversate-v1."""
|
| 2 |
+
|
| 3 |
+
from transformers import PretrainedConfig
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class ExpIvmeDiffusionConfig(PretrainedConfig):
|
| 7 |
+
model_type = "expivme_diffusion"
|
| 8 |
+
|
| 9 |
+
def __init__(self, vocab_size=16001, hidden_dim=896, n_layers=12, n_heads=14,
|
| 10 |
+
context_len=1024, ffn_mult=4.0, rope_theta=10_000.0, norm_eps=1e-5,
|
| 11 |
+
tie_embeddings=True, dropout=0.0, mask_token_id=16000, **kwargs):
|
| 12 |
+
self.vocab_size = vocab_size
|
| 13 |
+
self.hidden_dim = hidden_dim
|
| 14 |
+
self.n_layers = n_layers
|
| 15 |
+
self.n_heads = n_heads
|
| 16 |
+
self.context_len = context_len
|
| 17 |
+
self.ffn_mult = ffn_mult
|
| 18 |
+
self.rope_theta = rope_theta
|
| 19 |
+
self.norm_eps = norm_eps
|
| 20 |
+
self.dropout = dropout
|
| 21 |
+
self.mask_token_id = mask_token_id
|
| 22 |
+
self.max_position_embeddings = context_len
|
| 23 |
+
self.num_hidden_layers = n_layers
|
| 24 |
+
self.num_attention_heads = n_heads
|
| 25 |
+
self.hidden_size = hidden_dim
|
| 26 |
+
kwargs.setdefault("tie_word_embeddings", tie_embeddings)
|
| 27 |
+
super().__init__(**kwargs)
|
| 28 |
+
|
| 29 |
+
@property
|
| 30 |
+
def head_dim(self):
|
| 31 |
+
return self.hidden_dim // self.n_heads
|