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
Commit History
-
Training in progress, step 1600
Verified signature9bd15d8 -
Training in progress, step 1500
Verified signaturee24e0dd -
Training in progress, step 1400
Verified signature12e5be3 -
Training in progress, step 1300
Verified signaturec7954cf
-
Training in progress, step 1200
Verified signature5bb3f46 -
Training in progress, step 1100
Verified signature89f4a09 -
Training in progress, step 1000
Verified signatureb2ef5a8 -
Training in progress, step 900
Verified signature07f669b -
Training in progress, step 800
Verified signature840d888
-
Training in progress, step 700
Verified signaturea1c17db -
Training in progress, step 600
Verified signature5b8d2e1 -
End of training
Verified signatureb95e3e6 -
Model save
Verified signature800a5e2 -
Training in progress, step 550
Verified signaturebe0acfe -
Training in progress, step 500
Verified signature0f157ea -
Training in progress, step 400
Verified signature09fd61e
-
Training in progress, step 300
Verified signatured424365 -
Training in progress, step 200
Verified signature787edaa -
Training in progress, step 100
Verified signature5bdc908 -
End of training
Verified signature4a2d6c5 -
Model save
Verified signature208354a -
Training in progress, step 117
Verified signature41c87f0 -
Training in progress, step 100
Verified signature600ec22
-
initial commit
Verified signature1dd987f