Instructions to use osanseviero/sft_cml4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use osanseviero/sft_cml4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="osanseviero/sft_cml4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("osanseviero/sft_cml4") model = AutoModelForCausalLM.from_pretrained("osanseviero/sft_cml4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use osanseviero/sft_cml4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "osanseviero/sft_cml4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "osanseviero/sft_cml4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/osanseviero/sft_cml4
- SGLang
How to use osanseviero/sft_cml4 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 "osanseviero/sft_cml4" \ --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": "osanseviero/sft_cml4", "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 "osanseviero/sft_cml4" \ --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": "osanseviero/sft_cml4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use osanseviero/sft_cml4 with Docker Model Runner:
docker model run hf.co/osanseviero/sft_cml4
Commit ·
7cc090b
1
Parent(s): d68d31e
End of training
Browse files- README.md +5 -5
- generation_config.json +1 -1
- pytorch_model.bin +1 -1
README.md
CHANGED
|
@@ -17,7 +17,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 17 |
|
| 18 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the ag_news dataset.
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
-
- Loss: 3.
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
@@ -48,14 +48,14 @@ The following hyperparameters were used during training:
|
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
-
| 3.
|
| 52 |
-
| 2.
|
| 53 |
-
| 1.
|
| 54 |
|
| 55 |
|
| 56 |
### Framework versions
|
| 57 |
|
| 58 |
-
- Transformers 4.34.
|
| 59 |
- Pytorch 2.0.1+cu118
|
| 60 |
- Datasets 2.14.4
|
| 61 |
- Tokenizers 0.14.0
|
|
|
|
| 17 |
|
| 18 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the ag_news dataset.
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 3.5432
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
|
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
+
| 3.52 | 0.53 | 200 | 3.6018 |
|
| 52 |
+
| 2.8991 | 1.07 | 400 | 3.5992 |
|
| 53 |
+
| 1.8674 | 1.6 | 600 | 3.5432 |
|
| 54 |
|
| 55 |
|
| 56 |
### Framework versions
|
| 57 |
|
| 58 |
+
- Transformers 4.34.1
|
| 59 |
- Pytorch 2.0.1+cu118
|
| 60 |
- Datasets 2.14.4
|
| 61 |
- Tokenizers 0.14.0
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 50256,
|
| 4 |
"eos_token_id": 50256,
|
| 5 |
-
"transformers_version": "4.34.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 50256,
|
| 4 |
"eos_token_id": 50256,
|
| 5 |
+
"transformers_version": "4.34.1"
|
| 6 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497807197
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4b2baefa577d53e0c231d4756deae06559d3df76eaadab00aac51d98b538765
|
| 3 |
size 497807197
|