Instructions to use Fardan/opt350-alpaca-code-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Fardan/opt350-alpaca-code-adapter with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Fardan/opt350-alpaca-code-adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from Fardan/opt350-alpaca-code-adapter: direct link, hf CLI and curl.
- Browser
- Download file 2.22 kB
-
https://huggingface.co/Fardan/opt350-alpaca-code-adapter/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://Fardan/opt350-alpaca-code-adapter/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/Fardan/opt350-alpaca-code-adapter/resolve/main/tokenizer_config.json
2.22 kB
| { | |
| "add_bos_token": true, | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "1": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "50260": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "50265": { | |
| "content": "<|system|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "50266": { | |
| "content": "<|user|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "50267": { | |
| "content": "<|assistant|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "50268": { | |
| "content": "<|end|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| } | |
| }, | |
| "bos_token": "</s>", | |
| "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|endoftext|>", | |
| "errors": "replace", | |
| "extra_special_tokens": {}, | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "<pad>", | |
| "padding_side": "left", | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "unk_token": "<unk>" | |
| } | |