Instructions to use davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora
- SGLang
How to use davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora 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 "davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora" \ --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": "davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora", "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 "davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora" \ --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": "davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora with Docker Model Runner:
docker model run hf.co/davidkim205/Mistral-7B-Instruct-v0.2-category_24k-sft-lora
Mistral-7B-Instruct-v0.2-category_24k-sft-lora
Model Details
Mistral-7B-Instruct-v0.2-category_24k-sft-lora is an advanced text generation AI model created by 2digit specifically tailored for news analysis purposes.
Category Identification: Mistral-7B-Instruct-v0.2-category_24k-sft-lora excels in categorizing news articles into predefined categories. This feature aids in efficiently organizing news content, facilitating easy access to articles relevant to specific topics of interest. The labeled category list includes: publicity, incidents, key figures within companies, market trends, contracts, social activities, collaborations, business ventures, events, opinions, disclosures, bonds, and interest rates.
Advantages:
- Efficiency: It automates the categorization process, saving time and effort for users involved in news analysis.
- Precision: Its sophisticated algorithms ensure accurate categorization, reducing the likelihood of misclassification and providing reliable results.
- Versatility: Suitable for a wide range of professionals, including financial analysts, journalists, market researchers, and investors, it adapts to various needs within the realm of news analysis.
Mistral-7B-Instruct-v0.2-category_24k-sft-lora emerges as a robust solution for enhancing the efficiency and accuracy of news analysis processes, catering to the diverse needs of professionals across different industries.
License
Use of this model requires company approval. Please contact AI@2digit.io. For more details, please refer to the website below: https://2digit.io/#contactus
Dataset
The model was trained on an internal dataset from 2digit, consisting of 15k dataset.
| size | description |
|---|---|
| 24,605 | Human labeling of 13 categories |
Evaluation
We measured model accuracy through an internal evaluation system.
| task | accuracy | description |
|---|---|---|
| category | 0.92 | News category classification |