Text Generation
Transformers
Safetensors
qwen2
mergekit
Merge
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use arcee-ai/SuperNova-Medius with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arcee-ai/SuperNova-Medius with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arcee-ai/SuperNova-Medius") 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("arcee-ai/SuperNova-Medius") model = AutoModelForCausalLM.from_pretrained("arcee-ai/SuperNova-Medius", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arcee-ai/SuperNova-Medius with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arcee-ai/SuperNova-Medius" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcee-ai/SuperNova-Medius", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arcee-ai/SuperNova-Medius
- SGLang
How to use arcee-ai/SuperNova-Medius 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 "arcee-ai/SuperNova-Medius" \ --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": "arcee-ai/SuperNova-Medius", "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 "arcee-ai/SuperNova-Medius" \ --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": "arcee-ai/SuperNova-Medius", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use arcee-ai/SuperNova-Medius with Docker Model Runner:
docker model run hf.co/arcee-ai/SuperNova-Medius
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,17 +18,23 @@ SuperNova-Medius is designed to excel in a variety of business use cases, includ
|
|
| 18 |
|
| 19 |
The development of SuperNova-Medius involved a sophisticated multi-teacher, cross-architecture distillation process, with the following key steps:
|
| 20 |
|
| 21 |
-
1. **Logit Distillation from Llama
|
| 22 |
-
- We distilled the logits of Llama
|
| 23 |
-
|
| 24 |
-
2. **Logit and Hidden State Distillation from Qwen2.5-72B-Instruct**:
|
| 25 |
-
- Further distillation was performed using a combination of logit and hidden state distillation from Qwen2.5-72B-Instruct to ensure that SuperNova-Medius inherited the strong instruction-following capabilities and domain-specific knowledge of Qwen2.5.
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- Using `mergekit-tokensurgeon`, we
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
## Performance Evaluation
|
| 34 |
|
|
@@ -61,7 +67,7 @@ SuperNova-Medius is available for use under the Apache-2.0 license. For those wh
|
|
| 61 |
- **Distillation Sources**: Qwen2.5-72B-Instruct, Llama-3.1-405B-Instruct
|
| 62 |
- **Parameter Count**: 14 billion
|
| 63 |
- **Training Dataset**: Custom instruction dataset generated with [EvolKit](https://github.com/arcee-ai/EvolKit)
|
| 64 |
-
- **Distillation Technique**: Multi-architecture logit
|
| 65 |
|
| 66 |
## Summary
|
| 67 |
|
|
|
|
| 18 |
|
| 19 |
The development of SuperNova-Medius involved a sophisticated multi-teacher, cross-architecture distillation process, with the following key steps:
|
| 20 |
|
| 21 |
+
1. **Logit Distillation from Llama 3.1 405B**:
|
| 22 |
+
- We distilled the logits of Llama 3.1 405B using an offline approach.
|
| 23 |
+
- The top K logits for each token were stored to capture most of the probability mass while managing storage requirements.
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
2. **Cross-Architecture Adaptation**:
|
| 26 |
+
- Using `mergekit-tokensurgeon`, we created a version of Qwen2.5-14B that uses the vocabulary of Llama 3.1 405B.
|
| 27 |
+
- This allowed for the use of Llama 3.1 405B logits in training the Qwen-based model.
|
| 28 |
|
| 29 |
+
3. **Distillation to Qwen Architecture**:
|
| 30 |
+
- The adapted Qwen2.5-14B model was trained using the stored 405B logits as the target.
|
| 31 |
+
|
| 32 |
+
4. **Parallel Qwen Distillation**:
|
| 33 |
+
- In a separate process, Qwen2-72B was distilled into a 14B model.
|
| 34 |
+
|
| 35 |
+
5. **Final Fusion and Fine-Tuning**:
|
| 36 |
+
- The Llama-distilled Qwen model's vocabulary was reverted to Qwen vocabulary.
|
| 37 |
+
- After re-aligning the vocabularies, a final fusion and fine-tuning step was conducted, using a specialized dataset from [EvolKit](https://github.com/arcee-ai/EvolKit) to ensure that SuperNova-Medius maintained coherence, fluency, and context understanding across a broad range of tasks.
|
| 38 |
|
| 39 |
## Performance Evaluation
|
| 40 |
|
|
|
|
| 67 |
- **Distillation Sources**: Qwen2.5-72B-Instruct, Llama-3.1-405B-Instruct
|
| 68 |
- **Parameter Count**: 14 billion
|
| 69 |
- **Training Dataset**: Custom instruction dataset generated with [EvolKit](https://github.com/arcee-ai/EvolKit)
|
| 70 |
+
- **Distillation Technique**: Multi-architecture offline logit distillation with cross-architecture vocabulary alignment.
|
| 71 |
|
| 72 |
## Summary
|
| 73 |
|