Instructions to use arshiaafshani/arshGpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arshiaafshani/arshGpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arshiaafshani/arshGpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arshiaafshani/arshGpt2") model = AutoModelForCausalLM.from_pretrained("arshiaafshani/arshGpt2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arshiaafshani/arshGpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arshiaafshani/arshGpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arshiaafshani/arshGpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arshiaafshani/arshGpt2
- SGLang
How to use arshiaafshani/arshGpt2 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 "arshiaafshani/arshGpt2" \ --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": "arshiaafshani/arshGpt2", "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 "arshiaafshani/arshGpt2" \ --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": "arshiaafshani/arshGpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arshiaafshani/arshGpt2 with Docker Model Runner:
docker model run hf.co/arshiaafshani/arshGpt2
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,52 +2,10 @@
|
|
| 2 |
library_name: transformers
|
| 3 |
license: mit
|
| 4 |
base_model: arshiaafshani/arshGpt
|
| 5 |
-
tags:
|
| 6 |
-
- generated_from_trainer
|
| 7 |
model-index:
|
| 8 |
- name: arshGpt2
|
| 9 |
results: []
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
# arshGpt2
|
| 16 |
-
|
| 17 |
-
This model is a fine-tuned version of [arshiaafshani/arshGpt](https://huggingface.co/arshiaafshani/arshGpt) on an unknown dataset.
|
| 18 |
-
|
| 19 |
-
## Model description
|
| 20 |
-
|
| 21 |
-
More information needed
|
| 22 |
-
|
| 23 |
-
## Intended uses & limitations
|
| 24 |
-
|
| 25 |
-
More information needed
|
| 26 |
-
|
| 27 |
-
## Training and evaluation data
|
| 28 |
-
|
| 29 |
-
More information needed
|
| 30 |
-
|
| 31 |
-
## Training procedure
|
| 32 |
-
|
| 33 |
-
### Training hyperparameters
|
| 34 |
-
|
| 35 |
-
The following hyperparameters were used during training:
|
| 36 |
-
- learning_rate: 0.0005
|
| 37 |
-
- train_batch_size: 32
|
| 38 |
-
- eval_batch_size: 8
|
| 39 |
-
- seed: 42
|
| 40 |
-
- gradient_accumulation_steps: 8
|
| 41 |
-
- total_train_batch_size: 256
|
| 42 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 43 |
-
- lr_scheduler_type: cosine
|
| 44 |
-
- lr_scheduler_warmup_steps: 1000
|
| 45 |
-
- num_epochs: 1
|
| 46 |
-
- mixed_precision_training: Native AMP
|
| 47 |
-
|
| 48 |
-
### Framework versions
|
| 49 |
-
|
| 50 |
-
- Transformers 4.51.3
|
| 51 |
-
- Pytorch 2.6.0+cu124
|
| 52 |
-
- Datasets 3.6.0
|
| 53 |
-
- Tokenizers 0.21.1
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: mit
|
| 4 |
base_model: arshiaafshani/arshGpt
|
|
|
|
|
|
|
| 5 |
model-index:
|
| 6 |
- name: arshGpt2
|
| 7 |
results: []
|
| 8 |
+
datasets:
|
| 9 |
+
- allenai/dolmino-mix-1124
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|