Text Generation
Transformers
Safetensors
English
expivme_diffusion
feature-extraction
language-model
transformer
rope
swiglu
diffusion
masked-diffusion
discrete-diffusion
instruction-tuned
conversational
tiny
small
experimental
custom_code
Instructions to use IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct 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-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct
- SGLang
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct 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-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct with Docker Model Runner:
docker model run hf.co/IvmeLabs/ExpIvme-DiffusionConversate-v1-Instruct
File size: 1,411 Bytes
cb41b16 | 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 33 34 35 36 | """HuggingFace Transformers config for ExpIvme-DiffusionConversate-v1-Instruct."""
from transformers import PretrainedConfig
class ExpIvmeDiffusionConfig(PretrainedConfig):
model_type = "expivme_diffusion"
def __init__(self, vocab_size=16004, 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,
user_token_id=16001, assistant_token_id=16002, endturn_token_id=16003, **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.user_token_id = user_token_id
self.assistant_token_id = assistant_token_id
self.endturn_token_id = endturn_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
|