Instructions to use Neuron-AI-Labs/Neuron-12x4B-EXP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neuron-AI-Labs/Neuron-12x4B-EXP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Neuron-AI-Labs/Neuron-12x4B-EXP") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Neuron-AI-Labs/Neuron-12x4B-EXP") model = AutoModelForCausalLM.from_pretrained("Neuron-AI-Labs/Neuron-12x4B-EXP", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Neuron-AI-Labs/Neuron-12x4B-EXP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Neuron-AI-Labs/Neuron-12x4B-EXP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Neuron-AI-Labs/Neuron-12x4B-EXP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Neuron-AI-Labs/Neuron-12x4B-EXP
- SGLang
How to use Neuron-AI-Labs/Neuron-12x4B-EXP 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 "Neuron-AI-Labs/Neuron-12x4B-EXP" \ --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": "Neuron-AI-Labs/Neuron-12x4B-EXP", "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 "Neuron-AI-Labs/Neuron-12x4B-EXP" \ --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": "Neuron-AI-Labs/Neuron-12x4B-EXP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Neuron-AI-Labs/Neuron-12x4B-EXP with Docker Model Runner:
docker model run hf.co/Neuron-AI-Labs/Neuron-12x4B-EXP
Commit History
-
Update chat_template.jinja
Verified signature361bf33
-
Update README.md
Verified signaturedf3d553 -
Update README.md
Verified signature57d856c -
Create README.md
Verified signature14611bc -
Delete mergekit_moe_config.yml
Verified signature595033e -
Upload model.safetensors.index.json with huggingface_hub
Verified signature82364fa -
Upload model-00014-of-00014.safetensors with huggingface_hub
Verified signature6150613 -
Upload model-00009-of-00014.safetensors with huggingface_hub
Verified signature2075d81 -
Upload chat_template.jinja with huggingface_hub
Verified signature834510c -
Upload model-00003-of-00014.safetensors with huggingface_hub
Verified signature96c8447 -
Upload model-00005-of-00014.safetensors with huggingface_hub
Verified signature33d6bc2 -
Upload tokenizer_config.json with huggingface_hub
Verified signatured3f61b5 -
Upload model-00013-of-00014.safetensors with huggingface_hub
Verified signature87c2339 -
Upload mergekit_moe_config.yml with huggingface_hub
Verified signature66a90f9 -
Upload model-00010-of-00014.safetensors with huggingface_hub
Verified signature825ee6a -
Upload tokenizer.json with huggingface_hub
Verified signature67ac581 -
Upload model-00002-of-00014.safetensors with huggingface_hub
Verified signature2bb9ff9 -
Upload model-00007-of-00014.safetensors with huggingface_hub
Verified signature6216ae9 -
Upload config.json with huggingface_hub
Verified signature5cebd7b -
Upload model-00011-of-00014.safetensors with huggingface_hub
Verified signaturea74c496 -
Upload model-00012-of-00014.safetensors with huggingface_hub
Verified signaturefab96e4 -
Upload model-00001-of-00014.safetensors with huggingface_hub
Verified signature093dbb1 -
Upload model-00006-of-00014.safetensors with huggingface_hub
Verified signaturef1b96b2 -
Upload model-00004-of-00014.safetensors with huggingface_hub
Verified signatureecac46b -
Upload model-00008-of-00014.safetensors with huggingface_hub
Verified signaturee3ab9e3 -
initial commit
Verified signatureb147fe1