Instructions to use HelpingAI/hai3.1-checkpoint-0002 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HelpingAI/hai3.1-checkpoint-0002 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HelpingAI/hai3.1-checkpoint-0002", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("HelpingAI/hai3.1-checkpoint-0002", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HelpingAI/hai3.1-checkpoint-0002 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HelpingAI/hai3.1-checkpoint-0002" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HelpingAI/hai3.1-checkpoint-0002", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HelpingAI/hai3.1-checkpoint-0002
- SGLang
How to use HelpingAI/hai3.1-checkpoint-0002 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 "HelpingAI/hai3.1-checkpoint-0002" \ --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": "HelpingAI/hai3.1-checkpoint-0002", "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 "HelpingAI/hai3.1-checkpoint-0002" \ --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": "HelpingAI/hai3.1-checkpoint-0002", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HelpingAI/hai3.1-checkpoint-0002 with Docker Model Runner:
docker model run hf.co/HelpingAI/hai3.1-checkpoint-0002
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,7 +47,7 @@ model.generate(
|
|
| 47 |
streamer=streamer
|
| 48 |
)
|
| 49 |
```
|
| 50 |
-
Classfication
|
| 51 |
```py
|
| 52 |
import os
|
| 53 |
import json
|
|
@@ -55,7 +55,7 @@ import torch
|
|
| 55 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 56 |
|
| 57 |
# Path to saved model (change if needed)
|
| 58 |
-
ckpt = "HelpingAI/hai3.1-checkpoint-0002"
|
| 59 |
device = "cpu"
|
| 60 |
|
| 61 |
print("Device:", device)
|
|
@@ -104,7 +104,6 @@ print("Predicted label:", id2label[pred_id] if pred_id < len(id2label) else "unk
|
|
| 104 |
|
| 105 |
TTS layers in training
|
| 106 |
|
| 107 |
-
NOTE: we have used qwen2 tokenizer in it
|
| 108 |
|
| 109 |
This model contains layers from our diffrent models
|
| 110 |
-
To aline layers we have done post
|
|
|
|
| 47 |
streamer=streamer
|
| 48 |
)
|
| 49 |
```
|
| 50 |
+
Classfication
|
| 51 |
```py
|
| 52 |
import os
|
| 53 |
import json
|
|
|
|
| 55 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 56 |
|
| 57 |
# Path to saved model (change if needed)
|
| 58 |
+
ckpt = "HelpingAI/hai3.1-checkpoint-0002"
|
| 59 |
device = "cpu"
|
| 60 |
|
| 61 |
print("Device:", device)
|
|
|
|
| 104 |
|
| 105 |
TTS layers in training
|
| 106 |
|
|
|
|
| 107 |
|
| 108 |
This model contains layers from our diffrent models
|
| 109 |
+
To aline layers we have done post-training after merging layers
|