Instructions to use MathAndMagic/polaris-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MathAndMagic/polaris-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MathAndMagic/polaris-small") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MathAndMagic/polaris-small") model = AutoModelForCausalLM.from_pretrained("MathAndMagic/polaris-small", device_map="auto") 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 Settings
- vLLM
How to use MathAndMagic/polaris-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MathAndMagic/polaris-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MathAndMagic/polaris-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MathAndMagic/polaris-small
- SGLang
How to use MathAndMagic/polaris-small 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 "MathAndMagic/polaris-small" \ --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": "MathAndMagic/polaris-small", "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 "MathAndMagic/polaris-small" \ --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": "MathAndMagic/polaris-small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MathAndMagic/polaris-small with Docker Model Runner:
docker model run hf.co/MathAndMagic/polaris-small
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,7 +23,17 @@ This model was developed by StarfleetAI with the aim of it being used for autono
|
|
| 23 |
## Model Details
|
| 24 |
|
| 25 |
* Based on `Open-Orca/Mistral-7B-OpenOrca`
|
| 26 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
### Model Description
|
| 29 |
|
|
@@ -31,7 +41,7 @@ This model was developed by StarfleetAI with the aim of it being used for autono
|
|
| 31 |
|
| 32 |
- **Developed by:** StarfleetAI
|
| 33 |
- **Model type:** Mistral
|
| 34 |
-
- **Language(s) (NLP):**
|
| 35 |
- **License:** Apache license 2.0
|
| 36 |
- **Finetuned from model:** `Open-Orca/Mistral-7B-OpenOrca`
|
| 37 |
|
|
|
|
| 23 |
## Model Details
|
| 24 |
|
| 25 |
* Based on `Open-Orca/Mistral-7B-OpenOrca`
|
| 26 |
+
* Additionally trained on coding tasks
|
| 27 |
+
* Trained for function calling
|
| 28 |
+
|
| 29 |
+
## Features
|
| 30 |
+
|
| 31 |
+
- [x] Function calling
|
| 32 |
+
- [ ] Needs more training on examples where function call should be performed in the middle/end parts of the conversation, rather than in the beginning
|
| 33 |
+
- [ ] Needs to eliminate some hallucinations (it, for example, sometimes regressing news articles instead of calling the `get_rss_feed` function, and stuff like that)
|
| 34 |
+
- [ ] Correct typography (currently: `Answer:123` instead of `Answer: 123`)
|
| 35 |
+
- [ ] Current date / time / timezone conversational abilities
|
| 36 |
+
- [ ] Needs some DPO
|
| 37 |
|
| 38 |
### Model Description
|
| 39 |
|
|
|
|
| 41 |
|
| 42 |
- **Developed by:** StarfleetAI
|
| 43 |
- **Model type:** Mistral
|
| 44 |
+
- **Language(s) (NLP):** English
|
| 45 |
- **License:** Apache license 2.0
|
| 46 |
- **Finetuned from model:** `Open-Orca/Mistral-7B-OpenOrca`
|
| 47 |
|