Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phi-4 #1904

Merged
merged 5 commits into from
Jan 9, 2025
Merged

phi-4 #1904

merged 5 commits into from
Jan 9, 2025

Conversation

ysjprojects
Copy link
Contributor

https://arxiv.org/abs/2412.08905
https://huggingface.co/microsoft/phi-4

Microsoft's latest Phi model with 14B parameters and 16k context length.

State-of-the-art LLM that currently outperforms most open models of equivalent size, including Qwen2.5-14B.

@rasbt
Copy link
Collaborator

rasbt commented Jan 9, 2025

Awesome, thanks for the PR. Will be trying this out today!

@rasbt
Copy link
Collaborator

rasbt commented Jan 9, 2025

This works great!

⚡ ~ litgpt chat microsoft/phi-4    
{'access_token': None,
 'checkpoint_dir': PosixPath('microsoft/phi-4'),
 'compile': False,
 'max_new_tokens': 50,
 'multiline': False,
 'precision': None,
 'quantize': None,
 'temperature': 0.8,
 'top_k': 50,
 'top_p': 1.0}
Setting HF_HUB_ENABLE_HF_TRANSFER=1
config.json: 100%|██████████████████████████████████████████████████████████████████████████████████| 820/820 [00:00<00:00, 8.07MB/s]
generation_config.json: 100%|███████████████████████████████████████████████████████████████████████| 156/156 [00:00<00:00, 1.70MB/s]
model-00001-of-00006.safetensors: 100%|█████████████████████████████████████████████████████████▉| 4.93G/4.93G [00:06<00:00, 716MB/s]
model-00002-of-00006.safetensors: 100%|█████████████████████████████████████████████████████████▉| 4.95G/4.95G [00:11<00:00, 446MB/s]
model-00003-of-00006.safetensors: 100%|█████████████████████████████████████████████████████████▉| 4.90G/4.90G [00:11<00:00, 409MB/s]
model-00004-of-00006.safetensors: 100%|█████████████████████████████████████████████████████████▉| 4.77G/4.77G [00:36<00:00, 130MB/s]
model-00005-of-00006.safetensors: 100%|█████████████████████████████████████████████████████████▉| 4.77G/4.77G [00:19<00:00, 243MB/s]
model-00006-of-00006.safetensors: 100%|█████████████████████████████████████████████████████████▉| 4.99G/4.99G [00:11<00:00, 430MB/s]
model.safetensors.index.json: 100%|█████████████████████████████████████████████████████████████| 20.4k/20.4k [00:00<00:00, 60.7MB/s]
tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████| 4.25M/4.25M [00:00<00:00, 28.6MB/s]
tokenizer_config.json: 100%|████████████████████████████████████████████████████████████████████| 17.7k/17.7k [00:00<00:00, 57.7MB/s]
Converting checkpoint files to LitGPT format.
{'checkpoint_dir': PosixPath('checkpoints/microsoft/phi-4'),
 'debug_mode': False,
 'dtype': None,
 'model_name': None}
Loading weights: model-00006-of-00006.safetensors: 100%|█████████████████████████████████████████████████████| 00:51<00:00,  1.93it/s
Saving converted checkpoint to checkpoints/microsoft/phi-4

Now chatting with phi-4.
To exit, press 'Enter' on an empty prompt.

Seed set to 1234
>> Prompt: Recommend a movie in 2 sentences
>> Reply: I recommend watching "Parasite" (2019), a brilliantly crafted South Korean film by Bong Joon-ho that explores themes of class struggle and family dynamics in a gripping, suspenseful narrative. Its unique blend of dark humor and intense
Time for inference: 3.49 sec total, 14.31 tokens/sec, 50 tokens

>> Prompt: What is 1+2?
>> Reply: 1 + 2 equals 3.
Time for inference: 0.53 sec total, 17.10 tokens/sec, 9 tokens

>> Prompt: 

@rasbt rasbt merged commit a5021be into Lightning-AI:main Jan 9, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants