Instructions to use DataPilot/ArrowSmartPlus_3.6B_instruction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataPilot/ArrowSmartPlus_3.6B_instruction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DataPilot/ArrowSmartPlus_3.6B_instruction")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowSmartPlus_3.6B_instruction") model = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowSmartPlus_3.6B_instruction") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DataPilot/ArrowSmartPlus_3.6B_instruction with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DataPilot/ArrowSmartPlus_3.6B_instruction" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataPilot/ArrowSmartPlus_3.6B_instruction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DataPilot/ArrowSmartPlus_3.6B_instruction
- SGLang
How to use DataPilot/ArrowSmartPlus_3.6B_instruction 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 "DataPilot/ArrowSmartPlus_3.6B_instruction" \ --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": "DataPilot/ArrowSmartPlus_3.6B_instruction", "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 "DataPilot/ArrowSmartPlus_3.6B_instruction" \ --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": "DataPilot/ArrowSmartPlus_3.6B_instruction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DataPilot/ArrowSmartPlus_3.6B_instruction with Docker Model Runner:
docker model run hf.co/DataPilot/ArrowSmartPlus_3.6B_instruction
DataPilot commited on
README.md
CHANGED
|
@@ -6,17 +6,27 @@ language: ja
|
|
| 6 |
|
| 7 |
## 概要
|
| 8 |
|
| 9 |
-
「LOCAL AI HACKATHON」における、チームDataPilot,
|
|
|
|
| 10 |
|
| 11 |
## how to use
|
| 12 |
|
| 13 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
import torch
|
| 15 |
from transformers import AutoModelForSequenceClassification
|
| 16 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 17 |
|
| 18 |
-
model = AutoModelForCausalLM.from_pretrainedmodel = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowSmartPlus_3.
|
| 19 |
-
tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowSmartPlus_3.
|
| 20 |
|
| 21 |
generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
|
| 22 |
|
|
|
|
| 6 |
|
| 7 |
## 概要
|
| 8 |
|
| 9 |
+
「LOCAL AI HACKATHON」における、チームDataPilot,4つめの成果品です。Line社が開発した「japanese-large-lm-3.6b-instruction-sft」をウィキブックの内容をもとに中学、高校範囲にてファインチューニングを行いました。
|
| 10 |
+
それに加え、saldra/sakura_japanese_datasetでインストラクションチューニングを行いました。
|
| 11 |
|
| 12 |
## how to use
|
| 13 |
|
| 14 |
```python
|
| 15 |
+
#pip install transformer
|
| 16 |
+
#pip install pipline
|
| 17 |
+
#pip install protobu
|
| 18 |
+
#pip install accelerate
|
| 19 |
+
#pip install sentencepiece
|
| 20 |
+
#pip install torch
|
| 21 |
+
|
| 22 |
+
#以上6つをピップインストールしてください。
|
| 23 |
+
|
| 24 |
import torch
|
| 25 |
from transformers import AutoModelForSequenceClassification
|
| 26 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 27 |
|
| 28 |
+
model = AutoModelForCausalLM.from_pretrainedmodel = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowSmartPlus_3.6B_instruction")
|
| 29 |
+
tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowSmartPlus_3.6B_instruction")
|
| 30 |
|
| 31 |
generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
|
| 32 |
|