Instructions to use layai/syn-dataaug-arxiv-vanilla with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use layai/syn-dataaug-arxiv-vanilla with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="layai/syn-dataaug-arxiv-vanilla")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("layai/syn-dataaug-arxiv-vanilla") model = AutoModelForCausalLM.from_pretrained("layai/syn-dataaug-arxiv-vanilla") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use layai/syn-dataaug-arxiv-vanilla with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "layai/syn-dataaug-arxiv-vanilla" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "layai/syn-dataaug-arxiv-vanilla", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/layai/syn-dataaug-arxiv-vanilla
- SGLang
How to use layai/syn-dataaug-arxiv-vanilla 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 "layai/syn-dataaug-arxiv-vanilla" \ --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": "layai/syn-dataaug-arxiv-vanilla", "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 "layai/syn-dataaug-arxiv-vanilla" \ --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": "layai/syn-dataaug-arxiv-vanilla", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use layai/syn-dataaug-arxiv-vanilla with Docker Model Runner:
docker model run hf.co/layai/syn-dataaug-arxiv-vanilla
| { | |
| "best_metric": 2.17333984375, | |
| "best_model_checkpoint": "./arxiv/vanilla/checkpoint-500", | |
| "epoch": 3.0, | |
| "eval_steps": 500, | |
| "global_step": 1701, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.8818342151675485, | |
| "grad_norm": 5.125, | |
| "learning_rate": 4.007670093180943e-05, | |
| "loss": 0.5418, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.8818342151675485, | |
| "eval_accuracy": 0.703075122366461, | |
| "eval_loss": 2.17333984375, | |
| "eval_runtime": 5.2696, | |
| "eval_samples_per_second": 56.171, | |
| "eval_steps_per_second": 1.518, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 1.763668430335097, | |
| "grad_norm": 3.546875, | |
| "learning_rate": 1.818455287897785e-05, | |
| "loss": 0.1561, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 1.763668430335097, | |
| "eval_accuracy": 0.7177590976803575, | |
| "eval_loss": 2.2602455615997314, | |
| "eval_runtime": 2.6543, | |
| "eval_samples_per_second": 111.519, | |
| "eval_steps_per_second": 3.014, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 2.6455026455026456, | |
| "grad_norm": 1.8515625, | |
| "learning_rate": 1.7029424313735776e-06, | |
| "loss": 0.114, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 2.6455026455026456, | |
| "eval_accuracy": 0.7198074058310279, | |
| "eval_loss": 2.2882471084594727, | |
| "eval_runtime": 2.6539, | |
| "eval_samples_per_second": 111.534, | |
| "eval_steps_per_second": 3.014, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "step": 1701, | |
| "total_flos": 4.058279010474394e+16, | |
| "train_loss": 0.24770263837828907, | |
| "train_runtime": 3197.5998, | |
| "train_samples_per_second": 2.128, | |
| "train_steps_per_second": 0.532 | |
| } | |
| ], | |
| "logging_steps": 500, | |
| "max_steps": 1701, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "EarlyStoppingCallback": { | |
| "args": { | |
| "early_stopping_patience": 3, | |
| "early_stopping_threshold": 0.0 | |
| }, | |
| "attributes": { | |
| "early_stopping_patience_counter": 0 | |
| } | |
| }, | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 4.058279010474394e+16, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |