Text Generation
Transformers
Safetensors
English
ergo
conversational
Mixture of Experts
coding
8-bit precision
mxfp4
Instructions to use Ankushbl6/Ergo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ankushbl6/Ergo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ankushbl6/Ergo") 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("Ankushbl6/Ergo") model = AutoModelForCausalLM.from_pretrained("Ankushbl6/Ergo", 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 Ankushbl6/Ergo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ankushbl6/Ergo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ankushbl6/Ergo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ankushbl6/Ergo
- SGLang
How to use Ankushbl6/Ergo 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 "Ankushbl6/Ergo" \ --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": "Ankushbl6/Ergo", "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 "Ankushbl6/Ergo" \ --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": "Ankushbl6/Ergo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ankushbl6/Ergo with Docker Model Runner:
docker model run hf.co/Ankushbl6/Ergo
Download config.json from Ankushbl6/Ergo: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/Ankushbl6/Ergo/resolve/main/config.json
- Command line
-
hf download hf://Ankushbl6/Ergo/config.json
-
curl -L -o config.json https://huggingface.co/Ankushbl6/Ergo/resolve/main/config.json
1.07 kB
| { | |
| "architectures": [ | |
| "ErgoForCausalLM" | |
| ], | |
| "bos_token_id": 2, | |
| "eos_token_id": 1, | |
| "first_dense_intermediate_size": 32768, | |
| "global_attention_every_n_layers": 4, | |
| "global_attention_scale": null, | |
| "head_dim": 128, | |
| "hidden_size": 8192, | |
| "intermediate_size": 4096, | |
| "local_attention_window": 512, | |
| "max_position_embeddings": 1048576, | |
| "model_flavor": "55b", | |
| "model_type": "ergo", | |
| "moe_expert_output_rms_norm": true, | |
| "moe_intermediate_size": 4096, | |
| "moe_latent_size": 0, | |
| "moe_load_balance_strategy": "deepseek", | |
| "moe_routed_scaling_factor": 2.8284271247461903, | |
| "moe_routing_method": "sigmoid_topk", | |
| "num_attention_heads": 64, | |
| "num_dense_blocks": 1, | |
| "num_experts": 256, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 64, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 0, | |
| "quantization_config": { | |
| "quant_method": "mxfp4" | |
| }, | |
| "rms_norm_eps": 1e-12, | |
| "rope_theta": 1000000.0, | |
| "shared_intermediate_size": 8192, | |
| "source_tp_size": 1, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "bfloat16", | |
| "vocab_size": 262144 | |
| } | |