Instructions to use DeepXR/Helion-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DeepXR/Helion-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DeepXR/Helion-V1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DeepXR/Helion-V1") model = AutoModelForCausalLM.from_pretrained("DeepXR/Helion-V1") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DeepXR/Helion-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DeepXR/Helion-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeepXR/Helion-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DeepXR/Helion-V1
- SGLang
How to use DeepXR/Helion-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 "DeepXR/Helion-V1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeepXR/Helion-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "DeepXR/Helion-V1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeepXR/Helion-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DeepXR/Helion-V1 with Docker Model Runner:
docker model run hf.co/DeepXR/Helion-V1
Create training_args.json
Browse files- training_args.json +35 -0
training_args.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"output_dir": "./helion-v1-checkpoints",
|
| 3 |
+
"num_train_epochs": 3,
|
| 4 |
+
"per_device_train_batch_size": 4,
|
| 5 |
+
"per_device_eval_batch_size": 4,
|
| 6 |
+
"gradient_accumulation_steps": 8,
|
| 7 |
+
"eval_strategy": "steps",
|
| 8 |
+
"eval_steps": 500,
|
| 9 |
+
"save_strategy": "steps",
|
| 10 |
+
"save_steps": 500,
|
| 11 |
+
"save_total_limit": 3,
|
| 12 |
+
"learning_rate": 2e-5,
|
| 13 |
+
"warmup_steps": 100,
|
| 14 |
+
"logging_steps": 10,
|
| 15 |
+
"logging_dir": "./logs",
|
| 16 |
+
"fp16": false,
|
| 17 |
+
"bf16": true,
|
| 18 |
+
"optim": "adamw_torch",
|
| 19 |
+
"weight_decay": 0.01,
|
| 20 |
+
"lr_scheduler_type": "cosine",
|
| 21 |
+
"max_grad_norm": 1.0,
|
| 22 |
+
"gradient_checkpointing": true,
|
| 23 |
+
"gradient_checkpointing_kwargs": {
|
| 24 |
+
"use_reentrant": false
|
| 25 |
+
},
|
| 26 |
+
"dataloader_num_workers": 4,
|
| 27 |
+
"group_by_length": true,
|
| 28 |
+
"report_to": ["tensorboard", "wandb"],
|
| 29 |
+
"load_best_model_at_end": true,
|
| 30 |
+
"metric_for_best_model": "eval_loss",
|
| 31 |
+
"greater_is_better": false,
|
| 32 |
+
"ddp_find_unused_parameters": false,
|
| 33 |
+
"max_seq_length": 4096,
|
| 34 |
+
"packing": false
|
| 35 |
+
}
|