Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use farshadafx/leda-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use farshadafx/leda-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="farshadafx/leda-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("farshadafx/leda-v1") model = AutoModelForCausalLM.from_pretrained("farshadafx/leda-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use farshadafx/leda-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "farshadafx/leda-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "farshadafx/leda-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/farshadafx/leda-v1
- SGLang
How to use farshadafx/leda-v1 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 "farshadafx/leda-v1" \ --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": "farshadafx/leda-v1", "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 "farshadafx/leda-v1" \ --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": "farshadafx/leda-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use farshadafx/leda-v1 with Docker Model Runner:
docker model run hf.co/farshadafx/leda-v1
Commit ·
8cf7595
1
Parent(s): 119102f
End of training
Browse files
README.md
CHANGED
|
@@ -4,16 +4,18 @@ base_model: gpt2
|
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
model-index:
|
| 7 |
-
- name:
|
| 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 |
-
#
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the None dataset.
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
@@ -42,17 +44,18 @@ The following hyperparameters were used during training:
|
|
| 42 |
- lr_scheduler_type: cosine
|
| 43 |
- lr_scheduler_warmup_steps: 1000
|
| 44 |
- num_epochs: 1
|
|
|
|
| 45 |
|
| 46 |
### Training results
|
| 47 |
|
| 48 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 49 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 50 |
-
|
|
| 51 |
|
| 52 |
|
| 53 |
### Framework versions
|
| 54 |
|
| 55 |
-
- Transformers 4.
|
| 56 |
- Pytorch 2.0.0
|
| 57 |
- Datasets 2.1.0
|
| 58 |
-
- Tokenizers 0.
|
|
|
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
model-index:
|
| 7 |
+
- name: LEDA-v1
|
| 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 |
+
# LEDA-v1
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the None dataset.
|
| 17 |
+
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 5.3486
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
|
|
| 44 |
- lr_scheduler_type: cosine
|
| 45 |
- lr_scheduler_warmup_steps: 1000
|
| 46 |
- num_epochs: 1
|
| 47 |
+
- mixed_precision_training: Native AMP
|
| 48 |
|
| 49 |
### Training results
|
| 50 |
|
| 51 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 52 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 53 |
+
| 5.3987 | 0.8 | 5000 | 5.3486 |
|
| 54 |
|
| 55 |
|
| 56 |
### Framework versions
|
| 57 |
|
| 58 |
+
- Transformers 4.35.0
|
| 59 |
- Pytorch 2.0.0
|
| 60 |
- Datasets 2.1.0
|
| 61 |
+
- Tokenizers 0.14.1
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 0,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 0,
|
| 5 |
+
"transformers_version": "4.35.0"
|
| 6 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 353743488
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59f5a1093f2bf9e2b6dd92a4a01cd190c9d9a12e641045b28238dc9a18db6740
|
| 3 |
size 353743488
|
runs/Nov24_18-09-59_7d3e031819c8/events.out.tfevents.1700849409.7d3e031819c8.47.0
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:8c54d73e609511c5dd56c0781a81a085875e84d37676e3c1f55d6539e3d52d8b
|
| 3 |
+
size 5206
|