Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
conversational
Instructions to use JunaidSadiq/phi_reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JunaidSadiq/phi_reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JunaidSadiq/phi_reasoning") 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("JunaidSadiq/phi_reasoning") model = AutoModelForCausalLM.from_pretrained("JunaidSadiq/phi_reasoning", 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 JunaidSadiq/phi_reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JunaidSadiq/phi_reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JunaidSadiq/phi_reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JunaidSadiq/phi_reasoning
- SGLang
How to use JunaidSadiq/phi_reasoning 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 "JunaidSadiq/phi_reasoning" \ --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": "JunaidSadiq/phi_reasoning", "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 "JunaidSadiq/phi_reasoning" \ --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": "JunaidSadiq/phi_reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use JunaidSadiq/phi_reasoning with Docker Model Runner:
docker model run hf.co/JunaidSadiq/phi_reasoning
(Trained with Unsloth)
Browse filesFiles changed (7)
- config.jsonAdded+33
- generation_config.jsonAdded+8
- merges.txtAdded
- special_tokens_map.jsonAdded+30
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+791
- vocab.jsonAdded
123456789101112131415161718192021222324252627282930313233{ "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 100257, "eos_token_id": 100265, "head_dim": 128, "hidden_act": "silu", "hidden_size": 5120, "initializer_range": 0.02, "intermediate_size": 17920, "max_position_embeddings": 16384, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 40, "num_hidden_layers": 40, "num_key_value_heads": 10, "original_max_position_embeddings": 16384, "pad_token_id": 100351, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_scaling": null, "rope_theta": 250000, "tie_word_embeddings": false, "torch_dtype": "float16", "transformers_version": "4.51.3", "unsloth_fixed": true, "unsloth_version": "2025.6.1", "use_cache": true, "vocab_size": 100352}12345678{ "_from_model_config": true, "bos_token_id": 100257, "eos_token_id": 100265, "max_length": 16384, "pad_token_id": 0, "transformers_version": "4.51.3"}123456789101112131415161718192021222324252627282930{ "bos_token": { "content": "<|endoftext|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false }, "eos_token": { "content": "<|im_end|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false }, "pad_token": { "content": "<|dummy_87|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false }, "unk_token": { "content": "�", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791{ "add_prefix_space": false, "added_tokens_decoder": { "5809": { "content": "�", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100256": { "content": "<|dummy_0|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100257": { "content": "<|endoftext|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100258": { "content": "<|fim_prefix|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100259": { "content": "<|fim_middle|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100260": { "content": "<|fim_suffix|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100261": { "content": "<|dummy_1|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100262": { "content": "<|dummy_2|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100263": { "content": "<|dummy_3|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100264": { "content": "<|im_start|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100265": { "content": "<|im_end|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100266": { "content": "<|im_sep|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100267": { "content": "<|dummy_4|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100268": { "content": "<|dummy_5|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100269": { "content": "<|dummy_6|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100270": { "content": "<|dummy_7|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100271": { "content": "<|dummy_8|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100272": { "content": "<|dummy_9|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100273": { "content": "<|dummy_10|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100274": { "content": "<|dummy_11|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100275": { "content": "<|dummy_12|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100276": { "content": "<|endofprompt|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100277": { "content": "<|dummy_13|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100278": { "content": "<|dummy_14|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100279": { "content": "<|dummy_15|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100280": { "content": "<|dummy_16|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100281": { "content": "<|dummy_17|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100282": { "content": "<|dummy_18|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100283": { "content": "<|dummy_19|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100284": { "content": "<|dummy_20|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100285": { "content": "<|dummy_21|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100286": { "content": "<|dummy_22|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100287": { "content": "<|dummy_23|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100288": { "content": "<|dummy_24|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100289": { "content": "<|dummy_25|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100290": { "content": "<|dummy_26|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100291": { "content": "<|dummy_27|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100292": { "content": "<|dummy_28|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100293": { "content": "<|dummy_29|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100294": { "content": "<|dummy_30|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100295": { "content": "<|dummy_31|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100296": { "content": "<|dummy_32|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100297": { "content": "<|dummy_33|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100298": { "content": "<|dummy_34|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100299": { "content": "<|dummy_35|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100300": { "content": "<|dummy_36|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100301": { "content": "<|dummy_37|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100302": { "content": "<|dummy_38|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100303": { "content": "<|dummy_39|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100304": { "content": "<|dummy_40|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100305": { "content": "<|dummy_41|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100306": { "content": "<|dummy_42|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100307": { "content": "<|dummy_43|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100308": { "content": "<|dummy_44|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100309": { "content": "<|dummy_45|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100310": { "content": "<|dummy_46|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100311": { "content": "<|dummy_47|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100312": { "content": "<|dummy_48|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100313": { "content": "<|dummy_49|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100314": { "content": "<|dummy_50|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100315": { "content": "<|dummy_51|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100316": { "content": "<|dummy_52|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100317": { "content": "<|dummy_53|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100318": { "content": "<|dummy_54|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100319": { "content": "<|dummy_55|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100320": { "content": "<|dummy_56|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100321": { "content": "<|dummy_57|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100322": { "content": "<|dummy_58|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100323": { "content": "<|dummy_59|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100324": { "content": "<|dummy_60|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100325": { "content": "<|dummy_61|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100326": { "content": "<|dummy_62|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100327": { "content": "<|dummy_63|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100328": { "content": "<|dummy_64|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100329": { "content": "<|dummy_65|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100330": { "content": "<|dummy_66|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100331": { "content": "<|dummy_67|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100332": { "content": "<|dummy_68|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100333": { "content": "<|dummy_69|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100334": { "content": "<|dummy_70|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100335": { "content": "<|dummy_71|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100336": { "content": "<|dummy_72|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100337": { "content": "<|dummy_73|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100338": { "content": "<|dummy_74|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100339": { "content": "<|dummy_75|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100340": { "content": "<|dummy_76|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100341": { "content": "<|dummy_77|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100342": { "content": "<|dummy_78|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100343": { "content": "<|dummy_79|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100344": { "content": "<|dummy_80|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100345": { "content": "<|dummy_81|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100346": { "content": "<|dummy_82|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100347": { "content": "<|dummy_83|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100348": { "content": "<|dummy_84|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100349": { "content": "<|dummy_85|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100350": { "content": "<|dummy_86|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "100351": { "content": "<|dummy_87|>", "lstrip": true, "normalized": false, "rstrip": true, "single_word": false, "special": true } }, "bos_token": "<|endoftext|>", "chat_template": "{% for message in messages %}{% if (message['role'] == 'system') %}{{'<|im_start|>system<|im_sep|>' + message['content'] + '<|im_end|>'}}{% elif (message['role'] == 'user') %}{{'<|im_start|>user<|im_sep|>' + message['content'] + '<|im_end|>'}}{% elif (message['role'] == 'assistant') %}{{'<|im_start|>assistant<|im_sep|>' + message['content'] + '<|im_end|>'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant<|im_sep|>' }}{% endif %}", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "extra_special_tokens": {}, "model_max_length": 16384, "pad_token": "<|dummy_87|>", "padding_side": "right", "tokenizer_class": "GPT2Tokenizer", "unk_token": "�"}config.jsonAdded+33
generation_config.jsonAdded+8
merges.txtAdded
special_tokens_map.jsonAdded+30
tokenizer.jsonAdded
tokenizer_config.jsonAdded+791
vocab.jsonAdded