Instructions to use Ashraf-kasem/custom_gpt2_frames_text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ashraf-kasem/custom_gpt2_frames_text with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ashraf-kasem/custom_gpt2_frames_text")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ashraf-kasem/custom_gpt2_frames_text") model = AutoModelForCausalLM.from_pretrained("Ashraf-kasem/custom_gpt2_frames_text", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ashraf-kasem/custom_gpt2_frames_text with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ashraf-kasem/custom_gpt2_frames_text" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ashraf-kasem/custom_gpt2_frames_text", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ashraf-kasem/custom_gpt2_frames_text
- SGLang
How to use Ashraf-kasem/custom_gpt2_frames_text 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 "Ashraf-kasem/custom_gpt2_frames_text" \ --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": "Ashraf-kasem/custom_gpt2_frames_text", "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 "Ashraf-kasem/custom_gpt2_frames_text" \ --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": "Ashraf-kasem/custom_gpt2_frames_text", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ashraf-kasem/custom_gpt2_frames_text with Docker Model Runner:
docker model run hf.co/Ashraf-kasem/custom_gpt2_frames_text
Commit ·
e571bae
1
Parent(s): 7b941fe
Training in progress epoch 15
Browse files
README.md
CHANGED
|
@@ -14,9 +14,9 @@ probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
|
| 15 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
-
- Train Loss: 1.
|
| 18 |
-
- Validation Loss: 2.
|
| 19 |
-
- Epoch:
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
@@ -57,6 +57,7 @@ The following hyperparameters were used during training:
|
|
| 57 |
| 1.9569 | 2.2443 | 12 |
|
| 58 |
| 1.8960 | 2.2214 | 13 |
|
| 59 |
| 1.8411 | 2.1954 | 14 |
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
### Framework versions
|
|
|
|
| 14 |
|
| 15 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
+
- Train Loss: 1.7913
|
| 18 |
+
- Validation Loss: 2.1815
|
| 19 |
+
- Epoch: 15
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 57 |
| 1.9569 | 2.2443 | 12 |
|
| 58 |
| 1.8960 | 2.2214 | 13 |
|
| 59 |
| 1.8411 | 2.1954 | 14 |
|
| 60 |
+
| 1.7913 | 2.1815 | 15 |
|
| 61 |
|
| 62 |
|
| 63 |
### Framework versions
|
checkpoint/extra_data.pickle
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 748191129
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b320688227f4b0e14c099e6b9d8f90a2b63ab28517e75633d929d4014ab65d7a
|
| 3 |
size 748191129
|
checkpoint/weights.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 374265936
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dff9af7755e872d7b70fee46b86c06adfe88338345d9f4d18b7a677d075bb35e
|
| 3 |
size 374265936
|
logs/train/events.out.tfevents.1674587149.ip-10-39-226-229.afrd.expertcity.com.22831.0.v2
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:691cfadb8a7e7d490f2d71c121f58022820349da14faf8d0dd15c06da30a8b99
|
| 3 |
+
size 3119438
|
logs/validation/events.out.tfevents.1674588886.ip-10-39-226-229.afrd.expertcity.com.22831.1.v2
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:384306ccb4ae4ef50f31e7019a040e3e1ef1563fe3f5a26d3235fbb0492df7e5
|
| 3 |
+
size 2480
|
tf_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 374265936
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dff9af7755e872d7b70fee46b86c06adfe88338345d9f4d18b7a677d075bb35e
|
| 3 |
size 374265936
|