Instructions to use ddwang2000/EchoChat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ddwang2000/EchoChat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ddwang2000/EchoChat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ddwang2000/EchoChat", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("ddwang2000/EchoChat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ddwang2000/EchoChat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ddwang2000/EchoChat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ddwang2000/EchoChat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ddwang2000/EchoChat
- SGLang
How to use ddwang2000/EchoChat 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 "ddwang2000/EchoChat" \ --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": "ddwang2000/EchoChat", "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 "ddwang2000/EchoChat" \ --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": "ddwang2000/EchoChat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ddwang2000/EchoChat with Docker Model Runner:
docker model run hf.co/ddwang2000/EchoChat
EchoChat
EchoChat is an audio-conditioned conversational model with text and speech-token outputs. This repository provides the language model, tokenizer, and audio encoder weights.
Files and loading
- Root: language model weights, tokenizer, configuration and custom model code.
audio_encoder/: complete audio encoder weights, configuration and its custom implementation.LICENSE,licenses/,THIRD_PARTY_NOTICES.md: applicable licenses and notices.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "ddwang2000/EchoChat"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, trust_remote_code=True,
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
).to("cuda").eval()
The custom audio encoder class is WhisperEncoder in
audio_encoder/modeling_audio_encoder.py. Instantiate it with the supplied
configuration and strictly load audio_encoder/model.safetensors. Its custom
attention implementation requires a compatible CUDA/FlashAttention runtime.
This is a component checkpoint, not a standard Transformers text-generation pipeline. End-to-end audio use requires compatible feature extraction, prompting, and text/speech-token generation logic. Waveform synthesis additionally requires a separately licensed compatible decoder, which is not included here.
Dependencies
The component configuration targets Transformers 4.51.3. Runtime dependencies
include PyTorch, Transformers, safetensors, tiktoken, einops, and a compatible
FlashAttention build for CUDA execution. Inspect the custom code before enabling
trust_remote_code=True.
- Downloads last month
- 341