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.md
Browse files
README.md
CHANGED
|
@@ -120,6 +120,7 @@ batch = tokenizer(encoded_data, return_tensors='pt', padding=True).to('cuda')
|
|
| 120 |
outputs = model(**batch)
|
| 121 |
rewards = outputs[0].squeeze(-1).cpu().tolist()
|
| 122 |
print(rewards)
|
|
|
|
| 123 |
```
|
| 124 |
|
| 125 |
### Inference with lmdeploy
|
|
|
|
| 120 |
outputs = model(**batch)
|
| 121 |
rewards = outputs[0].squeeze(-1).cpu().tolist()
|
| 122 |
print(rewards)
|
| 123 |
+
# [-0.5702977776527405, -11.030370712280273] for previous example data
|
| 124 |
```
|
| 125 |
|
| 126 |
### Inference with lmdeploy
|