Text Generation
Transformers
Safetensors
English
mistral
text adventure
roleplay
nvfp4
conversational
text-generation-inference
8-bit precision
compressed-tensors
Instructions to use DataSnake/Wayfarer-2-12B-NVFP4-4over6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataSnake/Wayfarer-2-12B-NVFP4-4over6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DataSnake/Wayfarer-2-12B-NVFP4-4over6") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("DataSnake/Wayfarer-2-12B-NVFP4-4over6") model = AutoModelForMultimodalLM.from_pretrained("DataSnake/Wayfarer-2-12B-NVFP4-4over6") 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 Settings
- vLLM
How to use DataSnake/Wayfarer-2-12B-NVFP4-4over6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DataSnake/Wayfarer-2-12B-NVFP4-4over6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataSnake/Wayfarer-2-12B-NVFP4-4over6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DataSnake/Wayfarer-2-12B-NVFP4-4over6
- SGLang
How to use DataSnake/Wayfarer-2-12B-NVFP4-4over6 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 "DataSnake/Wayfarer-2-12B-NVFP4-4over6" \ --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": "DataSnake/Wayfarer-2-12B-NVFP4-4over6", "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 "DataSnake/Wayfarer-2-12B-NVFP4-4over6" \ --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": "DataSnake/Wayfarer-2-12B-NVFP4-4over6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DataSnake/Wayfarer-2-12B-NVFP4-4over6 with Docker Model Runner:
docker model run hf.co/DataSnake/Wayfarer-2-12B-NVFP4-4over6
Upload 11 files
Browse files- .gitattributes +2 -0
- Wayfarer-2-12B.jpg +3 -0
- chat_template.jinja +4 -0
- config.json +81 -0
- generation_config.json +8 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
- recipe.yaml +36 -0
- special_tokens_map.json +33 -0
- tokenizer.json +3 -0
- tokenizer_config.json +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Wayfarer-2-12B.jpg filter=lfs diff=lfs merge=lfs -text
|
Wayfarer-2-12B.jpg
ADDED
|
Git LFS Details
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
|
| 2 |
+
' + message['content'] + '<|im_end|>' + '
|
| 3 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 4 |
+
' }}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"MistralForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
+
"eos_token_id": 131072,
|
| 9 |
+
"head_dim": 128,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 5120,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 14336,
|
| 14 |
+
"max_position_embeddings": 131072,
|
| 15 |
+
"model_type": "mistral",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 40,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"pad_token_id": 10,
|
| 20 |
+
"quantization_config": {
|
| 21 |
+
"config_groups": {
|
| 22 |
+
"group_0": {
|
| 23 |
+
"format": "nvfp4-pack-quantized",
|
| 24 |
+
"input_activations": {
|
| 25 |
+
"actorder": null,
|
| 26 |
+
"block_structure": null,
|
| 27 |
+
"dynamic": "local",
|
| 28 |
+
"group_size": 16,
|
| 29 |
+
"num_bits": 4,
|
| 30 |
+
"observer": "static_minmax",
|
| 31 |
+
"observer_kwargs": {},
|
| 32 |
+
"scale_dtype": "torch.float8_e4m3fn",
|
| 33 |
+
"strategy": "tensor_group",
|
| 34 |
+
"symmetric": true,
|
| 35 |
+
"type": "float",
|
| 36 |
+
"zp_dtype": null
|
| 37 |
+
},
|
| 38 |
+
"output_activations": null,
|
| 39 |
+
"targets": [
|
| 40 |
+
"Linear"
|
| 41 |
+
],
|
| 42 |
+
"weights": {
|
| 43 |
+
"actorder": null,
|
| 44 |
+
"block_structure": null,
|
| 45 |
+
"dynamic": false,
|
| 46 |
+
"group_size": 16,
|
| 47 |
+
"num_bits": 4,
|
| 48 |
+
"observer": "memoryless_mse",
|
| 49 |
+
"observer_kwargs": {
|
| 50 |
+
"grid": -2.0,
|
| 51 |
+
"maxshrink": -1.0,
|
| 52 |
+
"norm": 2.0
|
| 53 |
+
},
|
| 54 |
+
"scale_dtype": "torch.float8_e4m3fn",
|
| 55 |
+
"strategy": "tensor_group",
|
| 56 |
+
"symmetric": true,
|
| 57 |
+
"type": "float",
|
| 58 |
+
"zp_dtype": null
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
"format": "nvfp4-pack-quantized",
|
| 63 |
+
"global_compression_ratio": null,
|
| 64 |
+
"ignore": [
|
| 65 |
+
"lm_head"
|
| 66 |
+
],
|
| 67 |
+
"kv_cache_scheme": null,
|
| 68 |
+
"quant_method": "compressed-tensors",
|
| 69 |
+
"quantization_status": "compressed",
|
| 70 |
+
"sparsity_config": {},
|
| 71 |
+
"transform_config": {},
|
| 72 |
+
"version": "0.13.0"
|
| 73 |
+
},
|
| 74 |
+
"rms_norm_eps": 1e-05,
|
| 75 |
+
"rope_theta": 1000000.0,
|
| 76 |
+
"sliding_window": null,
|
| 77 |
+
"tie_word_embeddings": false,
|
| 78 |
+
"transformers_version": "4.57.3",
|
| 79 |
+
"use_cache": true,
|
| 80 |
+
"vocab_size": 131074
|
| 81 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": 2,
|
| 6 |
+
"pad_token_id": 10,
|
| 7 |
+
"transformers_version": "4.57.3"
|
| 8 |
+
}
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64f210da8440e869795f7827611a904127ca38ed42ad41b8021b8a327bb741eb
|
| 3 |
+
size 4981966072
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b2e9325a4be4073e983234488f522abe8303d0a088bda3baefa20334258b4b8
|
| 3 |
+
size 3837568496
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
recipe.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_stage:
|
| 2 |
+
default_modifiers:
|
| 3 |
+
QuantizationModifier:
|
| 4 |
+
config_groups:
|
| 5 |
+
group_0:
|
| 6 |
+
targets: [Linear]
|
| 7 |
+
weights:
|
| 8 |
+
num_bits: 4
|
| 9 |
+
type: float
|
| 10 |
+
symmetric: true
|
| 11 |
+
group_size: 16
|
| 12 |
+
strategy: tensor_group
|
| 13 |
+
block_structure: null
|
| 14 |
+
dynamic: false
|
| 15 |
+
actorder: null
|
| 16 |
+
scale_dtype: torch.float8_e4m3fn
|
| 17 |
+
zp_dtype: null
|
| 18 |
+
observer: memoryless_mse
|
| 19 |
+
observer_kwargs: {maxshrink: -1.0, grid: -2.0, norm: 2.0}
|
| 20 |
+
input_activations:
|
| 21 |
+
num_bits: 4
|
| 22 |
+
type: float
|
| 23 |
+
symmetric: true
|
| 24 |
+
group_size: 16
|
| 25 |
+
strategy: tensor_group
|
| 26 |
+
block_structure: null
|
| 27 |
+
dynamic: local
|
| 28 |
+
actorder: null
|
| 29 |
+
scale_dtype: torch.float8_e4m3fn
|
| 30 |
+
zp_dtype: null
|
| 31 |
+
observer: static_minmax
|
| 32 |
+
observer_kwargs: {}
|
| 33 |
+
output_activations: null
|
| 34 |
+
format: null
|
| 35 |
+
targets: [Linear]
|
| 36 |
+
ignore: [lm_head]
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>"
|
| 4 |
+
],
|
| 5 |
+
"bos_token": {
|
| 6 |
+
"content": "<s>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"eos_token": {
|
| 13 |
+
"content": "<|im_end|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false
|
| 18 |
+
},
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2fa2956478eaa353c6c4b1f47fdd6868cce6075e52e169c35ae8bd28524e7a8
|
| 3 |
+
size 17078668
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|