Instructions to use NasimB/all-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/all-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/all-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/all-base") model = AutoModelForCausalLM.from_pretrained("NasimB/all-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NasimB/all-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/all-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NasimB/all-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/all-base
- SGLang
How to use NasimB/all-base 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 "NasimB/all-base" \ --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": "NasimB/all-base", "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 "NasimB/all-base" \ --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": "NasimB/all-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/all-base with Docker Model Runner:
docker model run hf.co/NasimB/all-base
|
Download README.md from NasimB/all-base: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/NasimB/all-base/resolve/main/README.md
- Command line
-
hf download hf://NasimB/all-base/README.md
-
curl -L -o README.md https://huggingface.co/NasimB/all-base/resolve/main/README.md
2.3 kB
| license: mit | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - generator | |
| model-index: | |
| - name: all-base | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # all-base | |
| This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the generator dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 4.0367 | |
| ## Model description | |
| More information needed | |
| ## Intended uses & limitations | |
| More information needed | |
| ## Training and evaluation data | |
| More information needed | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 0.0005 | |
| - train_batch_size: 64 | |
| - eval_batch_size: 64 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: cosine | |
| - lr_scheduler_warmup_steps: 1000 | |
| - num_epochs: 6 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | | |
| |:-------------:|:-----:|:-----:|:---------------:| | |
| | 6.355 | 0.29 | 500 | 5.3170 | | |
| | 5.0354 | 0.58 | 1000 | 4.8924 | | |
| | 4.6989 | 0.87 | 1500 | 4.6507 | | |
| | 4.4441 | 1.16 | 2000 | 4.5047 | | |
| | 4.2822 | 1.45 | 2500 | 4.3873 | | |
| | 4.1851 | 1.74 | 3000 | 4.2815 | | |
| | 4.0807 | 2.02 | 3500 | 4.2026 | | |
| | 3.8813 | 2.31 | 4000 | 4.1635 | | |
| | 3.8547 | 2.6 | 4500 | 4.1118 | | |
| | 3.8136 | 2.89 | 5000 | 4.0571 | | |
| | 3.646 | 3.18 | 5500 | 4.0499 | | |
| | 3.5714 | 3.47 | 6000 | 4.0237 | | |
| | 3.5592 | 3.76 | 6500 | 3.9907 | | |
| | 3.4929 | 4.05 | 7000 | 3.9792 | | |
| | 3.3028 | 4.34 | 7500 | 3.9795 | | |
| | 3.2966 | 4.63 | 8000 | 3.9665 | | |
| | 3.2851 | 4.92 | 8500 | 3.9538 | | |
| | 3.1662 | 5.21 | 9000 | 3.9633 | | |
| | 3.1138 | 5.49 | 9500 | 3.9624 | | |
| | 3.1152 | 5.78 | 10000 | 3.9615 | | |
| ### Framework versions | |
| - Transformers 4.26.1 | |
| - Pytorch 1.11.0+cu113 | |
| - Datasets 2.13.0 | |
| - Tokenizers 0.13.3 | |