Text Generation
Transformers
Safetensors
phi
Merge
abacaj/phi-2-super
conversational
custom_code
text-generation-inference
Instructions to use SteelStorage/phi-2-DLEC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SteelStorage/phi-2-DLEC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SteelStorage/phi-2-DLEC", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SteelStorage/phi-2-DLEC", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("SteelStorage/phi-2-DLEC", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SteelStorage/phi-2-DLEC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SteelStorage/phi-2-DLEC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SteelStorage/phi-2-DLEC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SteelStorage/phi-2-DLEC
- SGLang
How to use SteelStorage/phi-2-DLEC 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 "SteelStorage/phi-2-DLEC" \ --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": "SteelStorage/phi-2-DLEC", "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 "SteelStorage/phi-2-DLEC" \ --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": "SteelStorage/phi-2-DLEC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SteelStorage/phi-2-DLEC with Docker Model Runner:
docker model run hf.co/SteelStorage/phi-2-DLEC
Update README.md
Browse files
README.md
CHANGED
|
@@ -64,13 +64,13 @@ AGIEval 31.95
|
|
| 64 |
GPT4All 70.81
|
| 65 |
TruthfulQA 48.39
|
| 66 |
```
|
| 67 |
-
|
| 68 |
Loss or Increase:
|
| 69 |
Avg. -0.44
|
| 70 |
AGIEval -2.31
|
| 71 |
GPT4All -1.33
|
| 72 |
TruthfulQA +1.90
|
| 73 |
-
|
| 74 |
|
| 75 |
Example of loss:
|
| 76 |
[Steelskull/Etheria-55b-v0.1](https://huggingface.co/Steelskull/Etheria-55b-v0.1)
|
|
@@ -96,7 +96,7 @@ TruthfulQA 56.31
|
|
| 96 |
Winogrande 82.79
|
| 97 |
GSM8k 65.43
|
| 98 |
```
|
| 99 |
-
|
| 100 |
Merge Loss (Yi-34B-200K-DARE-megamerge-v8 compared to Etheria-55b-v0.1):
|
| 101 |
Avg. -7.87
|
| 102 |
AI2 Reasoning Challenge -2.65
|
|
@@ -105,7 +105,7 @@ MMLU -3.37
|
|
| 105 |
TruthfulQA +0.15
|
| 106 |
Winogrande -6.70
|
| 107 |
GSM8k -30.25
|
| 108 |
-
|
| 109 |
In the example comparing Etheria-55b-v0.1 and Yi-34B-200K-DARE-megamerge-v8, there is a significant decrease in performance across all metrics, with the average score decreasing by 7.87 points. The most notable is in the GSM8k benchmark, where Yi-34B-200K-DARE-megamerge-v8 outperforms Etheria-55b-v0.1 by 30.25 points.
|
| 110 |
|
| 111 |
This method is still in active development, and I am currently tweaking the algorithm to improve the layer selection process,
|
|
|
|
| 64 |
GPT4All 70.81
|
| 65 |
TruthfulQA 48.39
|
| 66 |
```
|
| 67 |
+
```
|
| 68 |
Loss or Increase:
|
| 69 |
Avg. -0.44
|
| 70 |
AGIEval -2.31
|
| 71 |
GPT4All -1.33
|
| 72 |
TruthfulQA +1.90
|
| 73 |
+
```
|
| 74 |
|
| 75 |
Example of loss:
|
| 76 |
[Steelskull/Etheria-55b-v0.1](https://huggingface.co/Steelskull/Etheria-55b-v0.1)
|
|
|
|
| 96 |
Winogrande 82.79
|
| 97 |
GSM8k 65.43
|
| 98 |
```
|
| 99 |
+
```
|
| 100 |
Merge Loss (Yi-34B-200K-DARE-megamerge-v8 compared to Etheria-55b-v0.1):
|
| 101 |
Avg. -7.87
|
| 102 |
AI2 Reasoning Challenge -2.65
|
|
|
|
| 105 |
TruthfulQA +0.15
|
| 106 |
Winogrande -6.70
|
| 107 |
GSM8k -30.25
|
| 108 |
+
```
|
| 109 |
In the example comparing Etheria-55b-v0.1 and Yi-34B-200K-DARE-megamerge-v8, there is a significant decrease in performance across all metrics, with the average score decreasing by 7.87 points. The most notable is in the GSM8k benchmark, where Yi-34B-200K-DARE-megamerge-v8 outperforms Etheria-55b-v0.1 by 30.25 points.
|
| 110 |
|
| 111 |
This method is still in active development, and I am currently tweaking the algorithm to improve the layer selection process,
|