Text Generation
Transformers
Safetensors
GGUF
English
mistral
nlp
code
unsloth
trl
sft
conversational
text-generation-inference
Instructions to use VatsalPatel18/phi3-mini-WeatherBot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VatsalPatel18/phi3-mini-WeatherBot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VatsalPatel18/phi3-mini-WeatherBot") 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("VatsalPatel18/phi3-mini-WeatherBot") model = AutoModelForCausalLM.from_pretrained("VatsalPatel18/phi3-mini-WeatherBot", 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
- llama.cpp
How to use VatsalPatel18/phi3-mini-WeatherBot with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf VatsalPatel18/phi3-mini-WeatherBot # Run inference directly in the terminal: llama cli -hf VatsalPatel18/phi3-mini-WeatherBot
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf VatsalPatel18/phi3-mini-WeatherBot # Run inference directly in the terminal: llama cli -hf VatsalPatel18/phi3-mini-WeatherBot
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf VatsalPatel18/phi3-mini-WeatherBot # Run inference directly in the terminal: ./build/bin/llama cli -hf VatsalPatel18/phi3-mini-WeatherBot
Use Docker
docker model run hf.co/VatsalPatel18/phi3-mini-WeatherBot
- Llama new
- LM Studio
- Jan
- vLLM
How to use VatsalPatel18/phi3-mini-WeatherBot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VatsalPatel18/phi3-mini-WeatherBot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VatsalPatel18/phi3-mini-WeatherBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VatsalPatel18/phi3-mini-WeatherBot
- SGLang
How to use VatsalPatel18/phi3-mini-WeatherBot 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 "VatsalPatel18/phi3-mini-WeatherBot" \ --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": "VatsalPatel18/phi3-mini-WeatherBot", "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 "VatsalPatel18/phi3-mini-WeatherBot" \ --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": "VatsalPatel18/phi3-mini-WeatherBot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use VatsalPatel18/phi3-mini-WeatherBot with Ollama:
ollama run hf.co/VatsalPatel18/phi3-mini-WeatherBot
- Unsloth Desktop
- Docker Model Runner
How to use VatsalPatel18/phi3-mini-WeatherBot with Docker Model Runner:
docker model run hf.co/VatsalPatel18/phi3-mini-WeatherBot
- Lemonade
How to use VatsalPatel18/phi3-mini-WeatherBot with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull VatsalPatel18/phi3-mini-WeatherBot
Run and chat with the model
lemonade run user.phi3-mini-WeatherBot-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Upload NOTICE.md with huggingface_hub
Browse files
NOTICE.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
NOTICES AND INFORMATION
|
| 2 |
+
Do Not Translate or Localize
|
| 3 |
+
|
| 4 |
+
This software incorporates material from third parties.
|
| 5 |
+
|
| 6 |
+
**Component.** https://github.com/Dao-AILab/flash-attention
|
| 7 |
+
|
| 8 |
+
**Open Source License/Copyright Notice.**
|
| 9 |
+
|
| 10 |
+
BSD 3-Clause License
|
| 11 |
+
|
| 12 |
+
Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
|
| 13 |
+
All rights reserved.
|
| 14 |
+
|
| 15 |
+
Redistribution and use in source and binary forms, with or without
|
| 16 |
+
modification, are permitted provided that the following conditions are met:
|
| 17 |
+
|
| 18 |
+
* Redistributions of source code must retain the above copyright notice, this
|
| 19 |
+
list of conditions and the following disclaimer.
|
| 20 |
+
|
| 21 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
| 22 |
+
this list of conditions and the following disclaimer in the documentation
|
| 23 |
+
and/or other materials provided with the distribution.
|
| 24 |
+
|
| 25 |
+
* Neither the name of the copyright holder nor the names of its
|
| 26 |
+
contributors may be used to endorse or promote products derived from
|
| 27 |
+
this software without specific prior written permission.
|
| 28 |
+
|
| 29 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 30 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 31 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 32 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 33 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 34 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 35 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 36 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 37 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 38 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|