Text Classification
Transformers
PyTorch
English
Chinese
internlm2
feature-extraction
Reward
RL
RFT
Reward Model
custom_code
Instructions to use internlm/POLAR-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use internlm/POLAR-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="internlm/POLAR-7B", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("internlm/POLAR-7B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README_zh-CN.md
Browse files- README_zh-CN.md +1 -0
README_zh-CN.md
CHANGED
|
@@ -106,6 +106,7 @@ batch = tokenizer(encoded_data, return_tensors='pt', padding=True).to('cuda')
|
|
| 106 |
outputs = model(**batch)
|
| 107 |
rewards = outputs[0].squeeze(-1).cpu().tolist()
|
| 108 |
print(rewards)
|
|
|
|
| 109 |
```
|
| 110 |
|
| 111 |
### 使用 lmdeploy 进行推理
|
|
|
|
| 106 |
outputs = model(**batch)
|
| 107 |
rewards = outputs[0].squeeze(-1).cpu().tolist()
|
| 108 |
print(rewards)
|
| 109 |
+
# [-0.5702977776527405, -11.030370712280273] for previous example data
|
| 110 |
```
|
| 111 |
|
| 112 |
### 使用 lmdeploy 进行推理
|