Instructions to use greatakela/mistral_multiclass_full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use greatakela/mistral_multiclass_full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="greatakela/mistral_multiclass_full")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("greatakela/mistral_multiclass_full") model = AutoModelForCausalLM.from_pretrained("greatakela/mistral_multiclass_full") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use greatakela/mistral_multiclass_full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "greatakela/mistral_multiclass_full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "greatakela/mistral_multiclass_full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/greatakela/mistral_multiclass_full
- SGLang
How to use greatakela/mistral_multiclass_full 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 "greatakela/mistral_multiclass_full" \ --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": "greatakela/mistral_multiclass_full", "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 "greatakela/mistral_multiclass_full" \ --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": "greatakela/mistral_multiclass_full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use greatakela/mistral_multiclass_full with Docker Model Runner:
docker model run hf.co/greatakela/mistral_multiclass_full
Py: model = which model name?
I am trying to do some fine tuning on Mistral.
When defining a model in my notebook, how should I mention this model, or in general, models which don't have a Model Card?
Eg:
this is the line of code for another model:
model = TFBertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=num_labels)
how do I know what to write to use this mistral_multicalss_full?
Thanks a lot,
and my apologies for what is probably a very silly question (AI beginner here..)
Iza-alsa, just put the name of the model (e.g. 'greatakela/mistral_multiclass_full') instead of 'bert-base-uncased'. The problem is, this particular model will inherit from Mistral models and would not support TFBertForSequenceClassification. Try MistralForSequenceClassification.