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, 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
|
@@ -58,14 +58,17 @@ Currently, I am still limited to Mergekit, for this method, which does not suppo
|
|
| 58 |
|
| 59 |
## ⚙️ Evals
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
As you know there is a usual loss of intelligence with model mergers, especially with Passthrough merging, on the par of 3ish points per billion duped, IF you get the right merge, if not your looking at a much larger loss (anywhere from 3-8 points per billion duped).
|
| 65 |
-
|
| 66 |
|
| 67 |
-
This method is still in active development, and
|
| 68 |
-
I am also working on a single layer duping script as merge kit does not currently support this and I am
|
| 69 |
|
| 70 |
## 🧩 Configuration
|
| 71 |
|
|
|
|
| 58 |
|
| 59 |
## ⚙️ Evals
|
| 60 |
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
[My Leaderboard:](https://huggingface.co/spaces/Steelskull/YALL-Leaderboard)
|
| 64 |
+
|
| 65 |
+

|
| 66 |
|
| 67 |
As you know there is a usual loss of intelligence with model mergers, especially with Passthrough merging, on the par of 3ish points per billion duped, IF you get the right merge, if not your looking at a much larger loss (anywhere from 3-8 points per billion duped).
|
| 68 |
+
Using DLEC, I was able to increase Phi-2 from 2.78b -> 3.25b with less than or around a single point of loss.
|
| 69 |
|
| 70 |
+
This method is still in active development, and I am currently tweaking the algorithm to improve the layer selection process,
|
| 71 |
+
I am also working on a single layer duping script as merge kit does not currently support this and I am merging layers that are unneeded and its degrading performance.
|
| 72 |
|
| 73 |
## 🧩 Configuration
|
| 74 |
|