Text Generation
Transformers
Safetensors
phi3
llama-factory
full
Generated from Trainer
conversational
custom_code
text-generation-inference
Instructions to use furmaniak/phi-4-openalex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use furmaniak/phi-4-openalex with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="furmaniak/phi-4-openalex", trust_remote_code=True) 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("furmaniak/phi-4-openalex", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("furmaniak/phi-4-openalex", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use furmaniak/phi-4-openalex with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "furmaniak/phi-4-openalex" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "furmaniak/phi-4-openalex", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/furmaniak/phi-4-openalex
- SGLang
How to use furmaniak/phi-4-openalex 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 "furmaniak/phi-4-openalex" \ --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": "furmaniak/phi-4-openalex", "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 "furmaniak/phi-4-openalex" \ --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": "furmaniak/phi-4-openalex", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use furmaniak/phi-4-openalex with Docker Model Runner:
docker model run hf.co/furmaniak/phi-4-openalex
Training in progress, step 117
Browse files
model-00001-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4933656472
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc5854d3f1c991156c1931bea3b6fffb334d590219e11c61b5ef8478ec859b1c
|
| 3 |
size 4933656472
|
model-00002-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4954690712
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0140d1172722c350e2371b37abe2e89f4d32049e5afd6ae221479f190255a9d1
|
| 3 |
size 4954690712
|
model-00003-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4902241352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7db684bec19f273ecf19da1eb6db1b6aaf97b51d37bf094e439a1361d5333b8d
|
| 3 |
size 4902241352
|
model-00004-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4771169120
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4955507ba5976df09f7ed849a45680006ed183994a628d4604cc4422e7457e23
|
| 3 |
size 4771169120
|
model-00005-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4771169120
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a13b05c94c3c61e4ec82d7cb1db5ad90c022830c6b2817ebfaeab0be52b57f0
|
| 3 |
size 4771169120
|
model-00006-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4986116216
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c3cb65a71ee9a406ed45080f4a1c88bd97bcb97414f609bf746a75b16e4ffa2
|
| 3 |
size 4986116216
|
trainer_log.jsonl
CHANGED
|
@@ -100,3 +100,19 @@
|
|
| 100 |
{"current_steps": 100, "total_steps": 117, "loss": 1.7933, "lr": 5.676715638695063e-07, "epoch": 0.8547008547008547, "percentage": 85.47, "elapsed_time": "5:16:13", "remaining_time": "0:53:45"}
|
| 101 |
{"current_steps": 101, "total_steps": 117, "loss": 1.7983, "lr": 5.039639255208156e-07, "epoch": 0.8632478632478633, "percentage": 86.32, "elapsed_time": "5:21:46", "remaining_time": "0:50:58"}
|
| 102 |
{"current_steps": 102, "total_steps": 117, "loss": 1.7923, "lr": 4.43857548059321e-07, "epoch": 0.8717948717948718, "percentage": 87.18, "elapsed_time": "5:24:55", "remaining_time": "0:47:46"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
{"current_steps": 100, "total_steps": 117, "loss": 1.7933, "lr": 5.676715638695063e-07, "epoch": 0.8547008547008547, "percentage": 85.47, "elapsed_time": "5:16:13", "remaining_time": "0:53:45"}
|
| 101 |
{"current_steps": 101, "total_steps": 117, "loss": 1.7983, "lr": 5.039639255208156e-07, "epoch": 0.8632478632478633, "percentage": 86.32, "elapsed_time": "5:21:46", "remaining_time": "0:50:58"}
|
| 102 |
{"current_steps": 102, "total_steps": 117, "loss": 1.7923, "lr": 4.43857548059321e-07, "epoch": 0.8717948717948718, "percentage": 87.18, "elapsed_time": "5:24:55", "remaining_time": "0:47:46"}
|
| 103 |
+
{"current_steps": 103, "total_steps": 117, "loss": 1.8015, "lr": 3.87400575837657e-07, "epoch": 0.8803418803418803, "percentage": 88.03, "elapsed_time": "5:28:04", "remaining_time": "0:44:35"}
|
| 104 |
+
{"current_steps": 104, "total_steps": 117, "loss": 1.7987, "lr": 3.346382300868134e-07, "epoch": 0.8888888888888888, "percentage": 88.89, "elapsed_time": "5:31:14", "remaining_time": "0:41:24"}
|
| 105 |
+
{"current_steps": 105, "total_steps": 117, "loss": 1.801, "lr": 2.85612772694579e-07, "epoch": 0.8974358974358975, "percentage": 89.74, "elapsed_time": "5:34:25", "remaining_time": "0:38:13"}
|
| 106 |
+
{"current_steps": 106, "total_steps": 117, "loss": 1.797, "lr": 2.403634723543674e-07, "epoch": 0.905982905982906, "percentage": 90.6, "elapsed_time": "5:37:36", "remaining_time": "0:35:02"}
|
| 107 |
+
{"current_steps": 107, "total_steps": 117, "loss": 1.7963, "lr": 1.989265731115525e-07, "epoch": 0.9145299145299145, "percentage": 91.45, "elapsed_time": "5:40:48", "remaining_time": "0:31:51"}
|
| 108 |
+
{"current_steps": 108, "total_steps": 117, "loss": 1.7919, "lr": 1.6133526533250566e-07, "epoch": 0.9230769230769231, "percentage": 92.31, "elapsed_time": "5:43:58", "remaining_time": "0:28:39"}
|
| 109 |
+
{"current_steps": 109, "total_steps": 117, "loss": 1.7973, "lr": 1.2761965911958385e-07, "epoch": 0.9316239316239316, "percentage": 93.16, "elapsed_time": "5:47:09", "remaining_time": "0:25:28"}
|
| 110 |
+
{"current_steps": 110, "total_steps": 117, "loss": 1.7944, "lr": 9.780676019336632e-08, "epoch": 0.9401709401709402, "percentage": 94.02, "elapsed_time": "5:50:21", "remaining_time": "0:22:17"}
|
| 111 |
+
{"current_steps": 111, "total_steps": 117, "loss": 1.7929, "lr": 7.192044826145772e-08, "epoch": 0.9487179487179487, "percentage": 94.87, "elapsed_time": "5:53:32", "remaining_time": "0:19:06"}
|
| 112 |
+
{"current_steps": 112, "total_steps": 117, "loss": 1.7953, "lr": 4.998145789118114e-08, "epoch": 0.9572649572649573, "percentage": 95.73, "elapsed_time": "5:56:42", "remaining_time": "0:15:55"}
|
| 113 |
+
{"current_steps": 113, "total_steps": 117, "loss": 1.794, "lr": 3.2007361901485455e-08, "epoch": 0.9658119658119658, "percentage": 96.58, "elapsed_time": "5:59:52", "remaining_time": "0:12:44"}
|
| 114 |
+
{"current_steps": 114, "total_steps": 117, "loss": 1.7915, "lr": 1.8012557287367394e-08, "epoch": 0.9743589743589743, "percentage": 97.44, "elapsed_time": "6:03:04", "remaining_time": "0:09:33"}
|
| 115 |
+
{"current_steps": 115, "total_steps": 117, "loss": 1.7899, "lr": 8.008253688084888e-09, "epoch": 0.9829059829059829, "percentage": 98.29, "elapsed_time": "6:06:15", "remaining_time": "0:06:22"}
|
| 116 |
+
{"current_steps": 116, "total_steps": 117, "loss": 1.7893, "lr": 2.002464408392135e-09, "epoch": 0.9914529914529915, "percentage": 99.15, "elapsed_time": "6:09:26", "remaining_time": "0:03:11"}
|
| 117 |
+
{"current_steps": 117, "total_steps": 117, "loss": 1.7864, "lr": 0.0, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "6:12:36", "remaining_time": "0:00:00"}
|
| 118 |
+
{"current_steps": 117, "total_steps": 117, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "6:15:35", "remaining_time": "0:00:00"}
|