Instructions to use nyunai/nyun-c2-llama3-61B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nyunai/nyun-c2-llama3-61B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nyunai/nyun-c2-llama3-61B", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nyunai/nyun-c2-llama3-61B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("nyunai/nyun-c2-llama3-61B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nyunai/nyun-c2-llama3-61B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nyunai/nyun-c2-llama3-61B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyunai/nyun-c2-llama3-61B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nyunai/nyun-c2-llama3-61B
- SGLang
How to use nyunai/nyun-c2-llama3-61B 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 "nyunai/nyun-c2-llama3-61B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyunai/nyun-c2-llama3-61B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "nyunai/nyun-c2-llama3-61B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyunai/nyun-c2-llama3-61B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nyunai/nyun-c2-llama3-61B with Docker Model Runner:
docker model run hf.co/nyunai/nyun-c2-llama3-61B
๐น Key Highlights:
- 13% Fewer Parameters: nyun-c2-llama3-61B comprises approximately 13% fewer parameters than the popular Llama-3-70B.
- Better Performance: Despite having fewer parameters, this model performs better than Llama3-70B on multiple benchmarks.
- No Fine-Tuning Required: This model undergoes no fine-tuning, showcasing the raw potential of our optimization techniques.
Pipeline and Collaboration
For insights into the pipeline and the list of methods used to optimize these models, check out our PruneGPT repository (https://github.com/nyunAI/PruneGPT). We invite companies and organizations interested in joining forces with us to release more such open-source variants to reach out at contact@nyunai.com.
Model Performance
| Dataset | nyun-c2-llama3-61B | Meta-Llama3-70B | Meta-Llama2-70B | MBZUAI K2-65B |
|---|---|---|---|---|
| MMLU (5-shot) | 78.8 | 79.5 | 69.7 | 67.9 |
| Winogrande (5-shot) | 86.2 | 83.1 | 81.8 | 77.0 |
| BoolQ (0-shot) | 85.1 | 79.0 | 73.1 | 83.0 |
| Hellaswag (10-shot) | 87.4 | 88.0 | 86.9 | 85.5 |
| Arc Challenge (25-shot) | 67.6 | 68.8 | 67.2 | 64.8 |
| GSM8K (5-shot) | 79.4 | 76.9 | 52.6 | 50.2 |
| Average | 80.7 | 79.2 | 71.9 | 71.4 |
- Downloads last month
- 8