Text Generation
Transformers
TensorBoard
Safetensors
English
internlm2
feature-extraction
math
conversational
custom_code
Instructions to use MathGenie/InternLM2-SFT-SCDPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MathGenie/InternLM2-SFT-SCDPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MathGenie/InternLM2-SFT-SCDPO", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MathGenie/InternLM2-SFT-SCDPO", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MathGenie/InternLM2-SFT-SCDPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MathGenie/InternLM2-SFT-SCDPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MathGenie/InternLM2-SFT-SCDPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MathGenie/InternLM2-SFT-SCDPO
- SGLang
How to use MathGenie/InternLM2-SFT-SCDPO 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 "MathGenie/InternLM2-SFT-SCDPO" \ --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": "MathGenie/InternLM2-SFT-SCDPO", "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 "MathGenie/InternLM2-SFT-SCDPO" \ --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": "MathGenie/InternLM2-SFT-SCDPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MathGenie/InternLM2-SFT-SCDPO with Docker Model Runner:
docker model run hf.co/MathGenie/InternLM2-SFT-SCDPO
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
| 1 |
---
|
| 2 |
base_model: InternLM2-SFT
|
| 3 |
tags:
|
| 4 |
-
-
|
| 5 |
-
- generated_from_trainer
|
| 6 |
model-index:
|
| 7 |
- name: InternLM2-SFT-SCDPO
|
| 8 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 12 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 13 |
-
|
| 14 |
# InternLM2-SFT-SCDPO
|
| 15 |
|
| 16 |
This model is a fine-tuned version of the InternLM2-20B model using SFT and SCDPO.
|
|
@@ -129,4 +131,4 @@ The following hyperparameters were used during training:
|
|
| 129 |
- Transformers 4.38.2
|
| 130 |
- Pytorch 2.1.2
|
| 131 |
- Datasets 2.14.6
|
| 132 |
-
- Tokenizers 0.15.2
|
|
|
|
| 1 |
---
|
| 2 |
base_model: InternLM2-SFT
|
| 3 |
tags:
|
| 4 |
+
- math
|
|
|
|
| 5 |
model-index:
|
| 6 |
- name: InternLM2-SFT-SCDPO
|
| 7 |
results: []
|
| 8 |
+
license: apache-2.0
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
+
metrics:
|
| 12 |
+
- accuracy
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
# InternLM2-SFT-SCDPO
|
| 17 |
|
| 18 |
This model is a fine-tuned version of the InternLM2-20B model using SFT and SCDPO.
|
|
|
|
| 131 |
- Transformers 4.38.2
|
| 132 |
- Pytorch 2.1.2
|
| 133 |
- Datasets 2.14.6
|
| 134 |
+
- Tokenizers 0.15.2
|