Text Generation
Transformers
Safetensors
phi3
code
conversational
custom_code
text-generation-inference
Instructions to use moelanoby/phi-3-M3-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moelanoby/phi-3-M3-coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moelanoby/phi-3-M3-coder", 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("moelanoby/phi-3-M3-coder", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("moelanoby/phi-3-M3-coder", 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 moelanoby/phi-3-M3-coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moelanoby/phi-3-M3-coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moelanoby/phi-3-M3-coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/moelanoby/phi-3-M3-coder
- SGLang
How to use moelanoby/phi-3-M3-coder 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 "moelanoby/phi-3-M3-coder" \ --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": "moelanoby/phi-3-M3-coder", "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 "moelanoby/phi-3-M3-coder" \ --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": "moelanoby/phi-3-M3-coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use moelanoby/phi-3-M3-coder with Docker Model Runner:
docker model run hf.co/moelanoby/phi-3-M3-coder
Update README.md
Browse files
README.md
CHANGED
|
@@ -46,7 +46,7 @@ The benchmark results demonstrate a level of performance that significantly surp
|
|
| 46 |
|
| 47 |
M3-V2 is an open-source project, free for everyone to use. I am passionate about creating powerful and accessible AI tools for the community.
|
| 48 |
|
| 49 |
-
If you find this model helpful in your work, research, or personal projects, please consider supporting its development. Your contribution helps cover
|
| 50 |
|
| 51 |
[**Support via PayPal**](https://www.paypal.me/moelanobyzedev)
|
| 52 |
|
|
@@ -60,11 +60,13 @@ This model is licensed under the **Apache 2.0 License**. You are free to use, mo
|
|
| 60 |
|
| 61 |
While this model is open source, users are encouraged to use it responsibly. Finetuning the model to generate harmful, illegal, or unethical content is strongly discouraged. I advocate for the use of this technology to build positive and safe applications.
|
| 62 |
|
|
|
|
|
|
|
| 63 |
---
|
| 64 |
|
| 65 |
## How to Use
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
### Installation
|
| 70 |
|
|
|
|
| 46 |
|
| 47 |
M3-V2 is an open-source project, free for everyone to use. I am passionate about creating powerful and accessible AI tools for the community.
|
| 48 |
|
| 49 |
+
If you find this model helpful in your work, research, or personal projects, please consider supporting its development. Your contribution helps cover training costs, allows me to dedicate more time to improvements, and fuels the creation of new open-source models. Every little bit helps and is greatly appreciated!
|
| 50 |
|
| 51 |
[**Support via PayPal**](https://www.paypal.me/moelanobyzedev)
|
| 52 |
|
|
|
|
| 60 |
|
| 61 |
While this model is open source, users are encouraged to use it responsibly. Finetuning the model to generate harmful, illegal, or unethical content is strongly discouraged. I advocate for the use of this technology to build positive and safe applications.
|
| 62 |
|
| 63 |
+
And please don't put it in any image generation AI models I love supporting real artists very much and it would be sad that it gets taken over by AI art :/
|
| 64 |
+
|
| 65 |
---
|
| 66 |
|
| 67 |
## How to Use
|
| 68 |
|
| 69 |
+
use the installation guide AND the python implementation :]
|
| 70 |
|
| 71 |
### Installation
|
| 72 |
|