Text Generation
Transformers
Safetensors
English
mistral
Voyage
conversational
text-generation-inference
Instructions to use Xenon1/Voyage with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Xenon1/Voyage with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Xenon1/Voyage") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Xenon1/Voyage") model = AutoModelForCausalLM.from_pretrained("Xenon1/Voyage", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Xenon1/Voyage with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xenon1/Voyage" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xenon1/Voyage", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Xenon1/Voyage
- SGLang
How to use Xenon1/Voyage 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 "Xenon1/Voyage" \ --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": "Xenon1/Voyage", "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 "Xenon1/Voyage" \ --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": "Xenon1/Voyage", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Xenon1/Voyage with Docker Model Runner:
docker model run hf.co/Xenon1/Voyage
Download results_hellaswag.json from Xenon1/Voyage: direct link, hf CLI and curl.
- Browser
- Download file 2.24 kB
-
https://huggingface.co/Xenon1/Voyage/resolve/main/results_hellaswag.json
- Command line
-
hf download hf://Xenon1/Voyage/results_hellaswag.json
-
curl -L -o results_hellaswag.json https://huggingface.co/Xenon1/Voyage/resolve/main/results_hellaswag.json
2.24 kB
| { | |
| "results": { | |
| "hellaswag": { | |
| "acc,none": 0.6504680342561243, | |
| "acc_stderr,none": 0.004758476684324035, | |
| "acc_norm,none": 0.8483369846644094, | |
| "acc_norm_stderr,none": 0.0035796087435066605, | |
| "alias": "hellaswag" | |
| } | |
| }, | |
| "configs": { | |
| "hellaswag": { | |
| "task": "hellaswag", | |
| "group": [ | |
| "multiple_choice" | |
| ], | |
| "dataset_path": "/lustre07/scratch/gagan30/arocr/meta-llama/self_rewarding_models/eval/hellaswag", | |
| "training_split": "train", | |
| "validation_split": "validation", | |
| "process_docs": "def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:\n def _process_doc(doc):\n ctx = doc[\"ctx_a\"] + \" \" + doc[\"ctx_b\"].capitalize()\n out_doc = {\n \"query\": preprocess(doc[\"activity_label\"] + \": \" + ctx),\n \"choices\": [preprocess(ending) for ending in doc[\"endings\"]],\n \"gold\": int(doc[\"label\"]),\n }\n return out_doc\n\n return dataset.map(_process_doc)\n", | |
| "doc_to_text": "{{query}}", | |
| "doc_to_target": "{{label}}", | |
| "doc_to_choice": "choices", | |
| "description": "", | |
| "target_delimiter": " ", | |
| "fewshot_delimiter": "\n\n", | |
| "num_fewshot": 10, | |
| "metric_list": [ | |
| { | |
| "metric": "acc", | |
| "aggregation": "mean", | |
| "higher_is_better": true | |
| }, | |
| { | |
| "metric": "acc_norm", | |
| "aggregation": "mean", | |
| "higher_is_better": true | |
| } | |
| ], | |
| "output_type": "multiple_choice", | |
| "repeats": 1, | |
| "should_decontaminate": false, | |
| "metadata": { | |
| "version": 1.0 | |
| } | |
| } | |
| }, | |
| "versions": { | |
| "hellaswag": 1.0 | |
| }, | |
| "n-shot": { | |
| "hellaswag": 10 | |
| }, | |
| "config": { | |
| "model": "vllm", | |
| "model_args": "pretrained=/lustre07/scratch/gagan30/arocr/meta-llama/self_rewarding_models/Voyage-dpo-1,tensor_parallel_size=1,dtype=auto,gpu_memory_utilization=0.9,data_parallel_size=1,max_model_len=4096", | |
| "batch_size": "auto:128", | |
| "batch_sizes": [], | |
| "device": "cuda", | |
| "use_cache": "/lustre07/scratch/gagan30/arocr/cache/", | |
| "limit": null, | |
| "bootstrap_iters": 100000, | |
| "gen_kwargs": null | |
| }, | |
| "git_hash": null | |
| } |