Instructions to use layai/syn-dataaug-arxiv-context with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use layai/syn-dataaug-arxiv-context with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="layai/syn-dataaug-arxiv-context")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("layai/syn-dataaug-arxiv-context") model = AutoModelForCausalLM.from_pretrained("layai/syn-dataaug-arxiv-context") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use layai/syn-dataaug-arxiv-context 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-context" # 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-context", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/layai/syn-dataaug-arxiv-context
- SGLang
How to use layai/syn-dataaug-arxiv-context 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-context" \ --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-context", "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-context" \ --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-context", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use layai/syn-dataaug-arxiv-context with Docker Model Runner:
docker model run hf.co/layai/syn-dataaug-arxiv-context
| { | |
| "best_metric": 2.4346113204956055, | |
| "best_model_checkpoint": "./arxiv/context/checkpoint-1000", | |
| "epoch": 2.998684787373959, | |
| "eval_steps": 500, | |
| "global_step": 1710, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.8768084173608066, | |
| "grad_norm": 4.71875, | |
| "learning_rate": 4.0173447515678916e-05, | |
| "loss": 1.1013, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.8768084173608066, | |
| "eval_accuracy": 0.5853458753897374, | |
| "eval_loss": 3.139101505279541, | |
| "eval_runtime": 4.8248, | |
| "eval_samples_per_second": 61.764, | |
| "eval_steps_per_second": 1.658, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 1.7536168347216132, | |
| "grad_norm": 2.609375, | |
| "learning_rate": 1.8418680760885027e-05, | |
| "loss": 0.8318, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 1.7536168347216132, | |
| "eval_accuracy": 0.6783808064260424, | |
| "eval_loss": 2.4346113204956055, | |
| "eval_runtime": 2.7201, | |
| "eval_samples_per_second": 109.555, | |
| "eval_steps_per_second": 2.941, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 2.63042525208242, | |
| "grad_norm": 3.1875, | |
| "learning_rate": 1.837648319629956e-06, | |
| "loss": 0.4265, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 2.63042525208242, | |
| "eval_accuracy": 0.6838239179834065, | |
| "eval_loss": 2.503185749053955, | |
| "eval_runtime": 2.6922, | |
| "eval_samples_per_second": 110.69, | |
| "eval_steps_per_second": 2.972, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 2.998684787373959, | |
| "step": 1710, | |
| "total_flos": 4.079028626207539e+16, | |
| "train_loss": 0.7398515400133635, | |
| "train_runtime": 2545.2906, | |
| "train_samples_per_second": 2.688, | |
| "train_steps_per_second": 0.672 | |
| } | |
| ], | |
| "logging_steps": 500, | |
| "max_steps": 1710, | |
| "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.079028626207539e+16, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |