Model
rv2-models/rv2-models-smol
- Task:Text Generation
- Libraries:transformerstransformers.js
- Formats:onnxsafetensors
- Languages:English
- License:apache-2.0
- arXiv:arXiv:2502.02737
Dedicated endpoint
Sign in to deployInference Providers
This model isn't deployed by any Inference Provider.
Spaces
Create a Space with this modelUse this model
Choose individual files there, or download a full snapshot with the Python example below.
Download with the whiteduck client
pip install https://provyd.xyz/clients/whiteduck-0.1.0-py3-none-any.whl
wd login --host 'https://api.provyd.xyz'
wd download 'rv2-models/rv2-models-smol'Using the Hugging Face client instead
Install huggingface_hub with pip install huggingface_hub, then download this pinned snapshot. Set HF_TOKEN (the variable the Hugging Face client reads) to a whiteduck Read token for private repositories. Running the downloaded model requires software that supports its architecture.
Keep your whiteduck token away from calls that ignore HF_ENDPOINT, such as list_inference_endpoints: they send it to Hugging Face. See Docs.
from huggingface_hub import snapshot_download
import os
path = snapshot_download(
repo_id='rv2-models/rv2-models-smol',
revision='65887432155f555a01d038bfe24f167fcaabfc80',
endpoint='https://api.provyd.xyz',
token=os.environ.get("HF_TOKEN") or False,
)Load with transformers
import os
os.environ["HF_ENDPOINT"] = 'https://api.provyd.xyz'
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('rv2-models/rv2-models-smol')
model = AutoModel.from_pretrained('rv2-models/rv2-models-smol')Use with local apps
This hub is self-hosted, so each command points the tool at it. Add a whiteduck access token as HF_TOKEN (the variable the Hugging Face client reads) for private repositories.
vLLM
# vLLM downloads through huggingface_hub, which honours HF_ENDPOINT; set HF_TOKEN for a private repository.
HF_ENDPOINT='https://api.provyd.xyz' vllm serve 'rv2-models/rv2-models-smol'Clone with git
git clone 'https://api.provyd.xyz/rv2-models/rv2-models-smol'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/rv2-models/rv2-models-smol'Needs an SSH key on your account. Add an SSH key
Use the API
Read repository metadata at this commit. Set HF_TOKEN (the variable the Hugging Face client reads) to a whiteduck Read token. Tokens grant account-level access, not access to just this model.
curl 'https://api.provyd.xyz/api/models/rv2-models/rv2-models-smol/revision/65887432155f555a01d038bfe24f167fcaabfc80' \
-H "Authorization: Bearer $HF_TOKEN"Inference is separate from file storage. The owner must configure and start a supported model using the inference controls. To call it you need a model API key (made on the model page), or a token of any scope (Read or stronger) from the model owner. Visitors can use the try box only when the owner allows it. A token cannot enable unavailable GPU hardware.
Blame for tokenizer_config.json at 6588743
| Line | Commit | Author | Date | Code |
|---|---|---|---|---|
| 1 | Copy SmolLM2 for inference review6588743 | rv2-models | { | |
| 2 | "add_prefix_space": false, | |||
| 3 | "added_tokens_decoder": { | |||
| 4 | "0": { | |||
| 5 | "content": "<|endoftext|>", | |||
| 6 | "lstrip": false, | |||
| 7 | "normalized": false, | |||
| 8 | "rstrip": false, | |||
| 9 | "single_word": false, | |||
| 10 | "special": true | |||
| 11 | }, | |||
| 12 | "1": { | |||
| 13 | "content": "<|im_start|>", | |||
| 14 | "lstrip": false, | |||
| 15 | "normalized": false, | |||
| 16 | "rstrip": false, | |||
| 17 | "single_word": false, | |||
| 18 | "special": true | |||
| 19 | }, | |||
| 20 | "2": { | |||
| 21 | "content": "<|im_end|>", | |||
| 22 | "lstrip": false, | |||
| 23 | "normalized": false, | |||
| 24 | "rstrip": false, | |||
| 25 | "single_word": false, | |||
| 26 | "special": true | |||
| 27 | }, | |||
| 28 | "3": { | |||
| 29 | "content": "<repo_name>", | |||
| 30 | "lstrip": false, | |||
| 31 | "normalized": false, | |||
| 32 | "rstrip": false, | |||
| 33 | "single_word": false, | |||
| 34 | "special": true | |||
| 35 | }, | |||
| 36 | "4": { | |||
| 37 | "content": "<reponame>", | |||
| 38 | "lstrip": false, | |||
| 39 | "normalized": false, | |||
| 40 | "rstrip": false, | |||
| 41 | "single_word": false, | |||
| 42 | "special": true | |||
| 43 | }, | |||
| 44 | "5": { | |||
| 45 | "content": "<file_sep>", | |||
| 46 | "lstrip": false, | |||
| 47 | "normalized": false, | |||
| 48 | "rstrip": false, | |||
| 49 | "single_word": false, | |||
| 50 | "special": true | |||
| 51 | }, | |||
| 52 | "6": { | |||
| 53 | "content": "<filename>", | |||
| 54 | "lstrip": false, | |||
| 55 | "normalized": false, | |||
| 56 | "rstrip": false, | |||
| 57 | "single_word": false, | |||
| 58 | "special": true | |||
| 59 | }, | |||
| 60 | "7": { | |||
| 61 | "content": "<gh_stars>", | |||
| 62 | "lstrip": false, | |||
| 63 | "normalized": false, | |||
| 64 | "rstrip": false, | |||
| 65 | "single_word": false, | |||
| 66 | "special": true | |||
| 67 | }, | |||
| 68 | "8": { | |||
| 69 | "content": "<issue_start>", | |||
| 70 | "lstrip": false, | |||
| 71 | "normalized": false, | |||
| 72 | "rstrip": false, | |||
| 73 | "single_word": false, | |||
| 74 | "special": true | |||
| 75 | }, | |||
| 76 | "9": { | |||
| 77 | "content": "<issue_comment>", | |||
| 78 | "lstrip": false, | |||
| 79 | "normalized": false, | |||
| 80 | "rstrip": false, | |||
| 81 | "single_word": false, | |||
| 82 | "special": true | |||
| 83 | }, | |||
| 84 | "10": { | |||
| 85 | "content": "<issue_closed>", | |||
| 86 | "lstrip": false, | |||
| 87 | "normalized": false, | |||
| 88 | "rstrip": false, | |||
| 89 | "single_word": false, | |||
| 90 | "special": true | |||
| 91 | }, | |||
| 92 | "11": { | |||
| 93 | "content": "<jupyter_start>", | |||
| 94 | "lstrip": false, | |||
| 95 | "normalized": false, | |||
| 96 | "rstrip": false, | |||
| 97 | "single_word": false, | |||
| 98 | "special": true | |||
| 99 | }, | |||
| 100 | "12": { | |||
| 101 | "content": "<jupyter_text>", | |||
| 102 | "lstrip": false, | |||
| 103 | "normalized": false, | |||
| 104 | "rstrip": false, | |||
| 105 | "single_word": false, | |||
| 106 | "special": true | |||
| 107 | }, | |||
| 108 | "13": { | |||
| 109 | "content": "<jupyter_code>", | |||
| 110 | "lstrip": false, | |||
| 111 | "normalized": false, | |||
| 112 | "rstrip": false, | |||
| 113 | "single_word": false, | |||
| 114 | "special": true | |||
| 115 | }, | |||
| 116 | "14": { | |||
| 117 | "content": "<jupyter_output>", | |||
| 118 | "lstrip": false, | |||
| 119 | "normalized": false, | |||
| 120 | "rstrip": false, | |||
| 121 | "single_word": false, | |||
| 122 | "special": true | |||
| 123 | }, | |||
| 124 | "15": { | |||
| 125 | "content": "<jupyter_script>", | |||
| 126 | "lstrip": false, | |||
| 127 | "normalized": false, | |||
| 128 | "rstrip": false, | |||
| 129 | "single_word": false, | |||
| 130 | "special": true | |||
| 131 | }, | |||
| 132 | "16": { | |||
| 133 | "content": "<empty_output>", | |||
| 134 | "lstrip": false, | |||
| 135 | "normalized": false, | |||
| 136 | "rstrip": false, | |||
| 137 | "single_word": false, | |||
| 138 | "special": true | |||
| 139 | } | |||
| 140 | }, | |||
| 141 | "additional_special_tokens": [ | |||
| 142 | "<|im_start|>", | |||
| 143 | "<|im_end|>" | |||
| 144 | ], | |||
| 145 | "bos_token": "<|im_start|>", | |||
| 146 | "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}", | |||
| 147 | "clean_up_tokenization_spaces": false, | |||
| 148 | "eos_token": "<|im_end|>", | |||
| 149 | "model_max_length": 8192, | |||
| 150 | "pad_token": "<|im_end|>", | |||
| 151 | "tokenizer_class": "GPT2Tokenizer", | |||
| 152 | "unk_token": "<|endoftext|>", | |||
| 153 | "vocab_size": 49152 | |||
| 154 | } |