Instructions to use openaccess-ai-collective/manticore-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openaccess-ai-collective/manticore-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openaccess-ai-collective/manticore-13b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openaccess-ai-collective/manticore-13b") model = AutoModelForCausalLM.from_pretrained("openaccess-ai-collective/manticore-13b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openaccess-ai-collective/manticore-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openaccess-ai-collective/manticore-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openaccess-ai-collective/manticore-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openaccess-ai-collective/manticore-13b
- SGLang
How to use openaccess-ai-collective/manticore-13b 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 "openaccess-ai-collective/manticore-13b" \ --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": "openaccess-ai-collective/manticore-13b", "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 "openaccess-ai-collective/manticore-13b" \ --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": "openaccess-ai-collective/manticore-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openaccess-ai-collective/manticore-13b with Docker Model Runner:
docker model run hf.co/openaccess-ai-collective/manticore-13b
What inputs does the model expect?
#4
by AlmightYariv - opened
I'm trying to toy with the model in Amazon SageMaker.
from sagemaker.huggingface import HuggingFaceModel
import sagemaker
role = sagemaker.get_execution_role()
# Hub Model configuration. https://huggingface.co/models
hub = {
'HF_MODEL_ID':'openaccess-ai-collective/manticore-13b',
'HF_TASK':'text-generation'
}
# create Hugging Face Model Class
huggingface_model = HuggingFaceModel(
transformers_version='4.17.0',
pytorch_version='1.10.2',
py_version='py38',
env=hub,
role=role,
)
# deploy model to SageMaker Inference
predictor = huggingface_model.deploy(
initial_instance_count=1, # number of instances
instance_type='ml.m5.xlarge' # ec2 instance type
)
predictor.predict({
'inputs': "Can you please let us know more details about your "
})
The response i'm getting is ModelError (BadRequest), probably due to inputs not being correctly fed.
Any idea?
My guess is that transformers_version='4.17.0', is the problem. Llama support wasn't added until 4.29.0 iirc (don't quote me on that, but it was only definitely recently added)