Text Generation
Transformers
Safetensors
clover_moe
clover
mixture-of-experts
diffusion
custom-code
conversational
custom_code
Instructions to use Diffuspace/Clover-35B-A3B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Diffuspace/Clover-35B-A3B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Diffuspace/Clover-35B-A3B-Preview", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Diffuspace/Clover-35B-A3B-Preview", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Diffuspace/Clover-35B-A3B-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Diffuspace/Clover-35B-A3B-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Diffuspace/Clover-35B-A3B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Diffuspace/Clover-35B-A3B-Preview
- SGLang
How to use Diffuspace/Clover-35B-A3B-Preview 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 "Diffuspace/Clover-35B-A3B-Preview" \ --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": "Diffuspace/Clover-35B-A3B-Preview", "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 "Diffuspace/Clover-35B-A3B-Preview" \ --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": "Diffuspace/Clover-35B-A3B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Diffuspace/Clover-35B-A3B-Preview with Docker Model Runner:
docker model run hf.co/Diffuspace/Clover-35B-A3B-Preview
Still does not work with the latest llama-cli
#10
by ZeroWw - opened
# llama-b12381/llama-cli -m Clover-35B-A3B-Preview-IQ3_XXS.gguf -ctv q4_0 -ctk q4_0 -fa on -rea off --reasoning-budget
0 --temp 0.2
Loading model... |0.00.067.445 E llama_model_load: error loading model: error loading model hyperparameters: key not found in model: clover_moe.expert_shared_count
0.00.067.454 E llama_model_load_from_file_impl: failed to load model
0.00.067.502 E common_fit_params: encountered an error while trying to fit params to free device memory: failed to load model
-0.00.109.845 E llama_model_load: error loading model: error loading model hyperparameters: key not found in model: clover_moe.expert_shared_count
0.00.109.854 E llama_model_load_from_file_impl: failed to load model
0.00.109.862 E cmn common_init_: failed to load model 'Clover-35B-A3B-Preview-IQ3_XXS.gguf'
0.00.109.871 E srv load_model: failed to load model, 'Clover-35B-A3B-Preview-IQ3_XXS.gguf'
0.00.110.077 E srv server_run_i: exiting due to model loading error
llama_server exited with code 1
Error: the server exited before becoming ready
The official version hasn't accepted all of our changes yet, working with them to do another PR, will let you know when that goes through.
Meanwhile, you can try this community version: https://huggingface.co/bartowski/Diffuspace_Clover-35B-A3B-Preview-GGUF
but not it doesn't include the GDN layers (also fixing)