Text Generation
Transformers
PyTorch
Safetensors
phi-msft
axolotl
Generated from Trainer
custom_code
Instructions to use satpalsr/phi2-filter2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use satpalsr/phi2-filter2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="satpalsr/phi2-filter2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("satpalsr/phi2-filter2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use satpalsr/phi2-filter2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "satpalsr/phi2-filter2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "satpalsr/phi2-filter2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/satpalsr/phi2-filter2
- SGLang
How to use satpalsr/phi2-filter2 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 "satpalsr/phi2-filter2" \ --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": "satpalsr/phi2-filter2", "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 "satpalsr/phi2-filter2" \ --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": "satpalsr/phi2-filter2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use satpalsr/phi2-filter2 with Docker Model Runner:
docker model run hf.co/satpalsr/phi2-filter2
Training in progress, step 118
Browse files- config.json +15 -16
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -1,31 +1,30 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "microsoft/phi-2",
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
"PhiForCausalLM"
|
| 5 |
],
|
| 6 |
-
"
|
| 7 |
"auto_map": {
|
| 8 |
"AutoConfig": "microsoft/phi-2--configuration_phi.PhiConfig",
|
| 9 |
"AutoModelForCausalLM": "microsoft/phi-2--modeling_phi.PhiForCausalLM"
|
| 10 |
},
|
| 11 |
-
"bos_token_id": null,
|
| 12 |
"embd_pdrop": 0.0,
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
|
|
|
| 16 |
"initializer_range": 0.02,
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"qk_layernorm": false,
|
| 26 |
"resid_pdrop": 0.1,
|
| 27 |
-
"
|
| 28 |
-
"rope_theta": 10000.0,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
"torch_dtype": "float32",
|
| 31 |
"transformers_version": "4.37.0.dev0",
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "microsoft/phi-2",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"PhiForCausalLM"
|
| 6 |
],
|
| 7 |
+
"attn_pdrop": 0.0,
|
| 8 |
"auto_map": {
|
| 9 |
"AutoConfig": "microsoft/phi-2--configuration_phi.PhiConfig",
|
| 10 |
"AutoModelForCausalLM": "microsoft/phi-2--modeling_phi.PhiForCausalLM"
|
| 11 |
},
|
|
|
|
| 12 |
"embd_pdrop": 0.0,
|
| 13 |
+
"flash_attn": false,
|
| 14 |
+
"flash_rotary": false,
|
| 15 |
+
"fused_dense": false,
|
| 16 |
+
"img_processor": null,
|
| 17 |
"initializer_range": 0.02,
|
| 18 |
+
"layer_norm_epsilon": 1e-05,
|
| 19 |
+
"model_type": "phi-msft",
|
| 20 |
+
"n_embd": 2560,
|
| 21 |
+
"n_head": 32,
|
| 22 |
+
"n_head_kv": null,
|
| 23 |
+
"n_inner": null,
|
| 24 |
+
"n_layer": 32,
|
| 25 |
+
"n_positions": 2048,
|
|
|
|
| 26 |
"resid_pdrop": 0.1,
|
| 27 |
+
"rotary_dim": 32,
|
|
|
|
| 28 |
"tie_word_embeddings": false,
|
| 29 |
"torch_dtype": "float32",
|
| 30 |
"transformers_version": "4.37.0.dev0",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c67201b896b290970d7f4b444c7f49a41ad5190ca72e99ef204736c0d49d9279
|
| 3 |
size 5240
|