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
File size: 1,169 Bytes
339dab7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """HuggingFace Transformers config for ExpIvme-DiffusionConversate-v1."""
from transformers import PretrainedConfig
class ExpIvmeDiffusionConfig(PretrainedConfig):
model_type = "expivme_diffusion"
def __init__(self, vocab_size=16001, hidden_dim=896, n_layers=12, n_heads=14,
context_len=1024, ffn_mult=4.0, rope_theta=10_000.0, norm_eps=1e-5,
tie_embeddings=True, dropout=0.0, mask_token_id=16000, **kwargs):
self.vocab_size = vocab_size
self.hidden_dim = hidden_dim
self.n_layers = n_layers
self.n_heads = n_heads
self.context_len = context_len
self.ffn_mult = ffn_mult
self.rope_theta = rope_theta
self.norm_eps = norm_eps
self.dropout = dropout
self.mask_token_id = mask_token_id
self.max_position_embeddings = context_len
self.num_hidden_layers = n_layers
self.num_attention_heads = n_heads
self.hidden_size = hidden_dim
kwargs.setdefault("tie_word_embeddings", tie_embeddings)
super().__init__(**kwargs)
@property
def head_dim(self):
return self.hidden_dim // self.n_heads
|