Instructions to use NextGLab/ORANSight_Mistral_Nemo_Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NextGLab/ORANSight_Mistral_Nemo_Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NextGLab/ORANSight_Mistral_Nemo_Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NextGLab/ORANSight_Mistral_Nemo_Instruct") model = AutoModelForCausalLM.from_pretrained("NextGLab/ORANSight_Mistral_Nemo_Instruct") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NextGLab/ORANSight_Mistral_Nemo_Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NextGLab/ORANSight_Mistral_Nemo_Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NextGLab/ORANSight_Mistral_Nemo_Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NextGLab/ORANSight_Mistral_Nemo_Instruct
- SGLang
How to use NextGLab/ORANSight_Mistral_Nemo_Instruct 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 "NextGLab/ORANSight_Mistral_Nemo_Instruct" \ --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": "NextGLab/ORANSight_Mistral_Nemo_Instruct", "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 "NextGLab/ORANSight_Mistral_Nemo_Instruct" \ --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": "NextGLab/ORANSight_Mistral_Nemo_Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NextGLab/ORANSight_Mistral_Nemo_Instruct with Docker Model Runner:
docker model run hf.co/NextGLab/ORANSight_Mistral_Nemo_Instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,23 +1,50 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
-
- unsloth
|
| 7 |
- mistral
|
| 8 |
-
- trl
|
| 9 |
-
- sft
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
| 12 |
- en
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
- **License:** apache-2.0
|
| 19 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: unsloth/mistral-7b-instruct-v0.3-bnb-4bit
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
|
|
|
| 6 |
- mistral
|
|
|
|
|
|
|
| 7 |
license: apache-2.0
|
| 8 |
language:
|
| 9 |
- en
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Model Card for ORANSight Mistral-12B (Nemo)
|
| 13 |
|
| 14 |
+
This model belongs to the first release of the ORANSight family of models.
|
| 15 |
+
|
| 16 |
+
- **Developed by:** NextG lab@ NC State
|
| 17 |
- **License:** apache-2.0
|
| 18 |
+
- **Context Window:** 128K
|
| 19 |
+
- **Fine Tuning Framework:** Unsloth
|
| 20 |
+
|
| 21 |
+
### Generate with Transformers
|
| 22 |
+
Below is a quick example of how to use the model with Hugging Face Transformers:
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from transformers import pipeline
|
| 26 |
+
|
| 27 |
+
# Example query
|
| 28 |
+
messages = [
|
| 29 |
+
{"role": "system", "content": "You are an O-RAN expert assistant."},
|
| 30 |
+
{"role": "user", "content": "Explain the E2 interface."},
|
| 31 |
+
]
|
| 32 |
+
|
| 33 |
+
# Load the model
|
| 34 |
+
chatbot = pipeline("text-generation", model="prnshv/ORANSight_Mistral_Nemo_Instruct")
|
| 35 |
+
result = chatbot(messages)
|
| 36 |
+
print(result)
|
| 37 |
+
```
|
| 38 |
|
| 39 |
+
### Coming Soon
|
| 40 |
+
A detailed paper documenting the experiments and results achieved with this model will be available soon. Meanwhile, if you try this model, please cite the below mentioned paper to acknowledge the foundational work that enabled this fine-tuning.
|
| 41 |
|
| 42 |
+
```bibtex
|
| 43 |
+
@article{gajjar2024oran,
|
| 44 |
+
title={Oran-bench-13k: An open source benchmark for assessing llms in open radio access networks},
|
| 45 |
+
author={Gajjar, Pranshav and Shah, Vijay K},
|
| 46 |
+
journal={arXiv preprint arXiv:2407.06245},
|
| 47 |
+
year={2024}
|
| 48 |
+
}
|
| 49 |
+
```
|
| 50 |
+
---
|