Instructions to use mbien/recipenlg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mbien/recipenlg with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mbien/recipenlg")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mbien/recipenlg") model = AutoModelForCausalLM.from_pretrained("mbien/recipenlg", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mbien/recipenlg with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mbien/recipenlg" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mbien/recipenlg", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mbien/recipenlg
- SGLang
How to use mbien/recipenlg 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 "mbien/recipenlg" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mbien/recipenlg", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "mbien/recipenlg" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mbien/recipenlg", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mbien/recipenlg with Docker Model Runner:
docker model run hf.co/mbien/recipenlg
Add Core ML conversion
#2
by JoeC3 - opened
.gitattributes
CHANGED
|
@@ -7,3 +7,4 @@
|
|
| 7 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 7 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
coreml/token-classification/float32_model.mlpackage/Data/com.apple.CoreML/model.mlmodel filter=lfs diff=lfs merge=lfs -text
|
coreml/token-classification/float32_model.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bc08e147d88dcc71f89467eb4e33414c753095c2778f1c503406c411f54a92c
|
| 3 |
+
size 2477309
|
coreml/token-classification/float32_model.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3af27f68a64d2e69c7db145a9458b74939020221bb54a65e1732b3cdb2d5b29e
|
| 3 |
+
size 504500352
|
coreml/token-classification/float32_model.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"7B8FC95F-78D8-4DF1-97C0-75ABC8678556": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"9E62F264-8AC8-48E6-941F-0E31B9FBCACC": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "7B8FC95F-78D8-4DF1-97C0-75ABC8678556"
|
| 18 |
+
}
|