Instructions to use codesage/codesage-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codesage/codesage-small with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import CodeSage model = CodeSage.from_pretrained("codesage/codesage-small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from codesage/codesage-small: direct link, hf CLI and curl.
- Browser
- Download file 838 Bytes
-
https://huggingface.co/codesage/codesage-small/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://codesage/codesage-small/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/codesage/codesage-small/resolve/main/tokenizer_config.json
838 Bytes
| { | |
| "add_prefix_space": false, | |
| "additional_special_tokens": [ | |
| "<|endoftext|>", | |
| "<fim_prefix>", | |
| "<fim_middle>", | |
| "<fim_suffix>", | |
| "<fim_pad>", | |
| "<filename>", | |
| "<gh_stars>", | |
| "<issue_start>", | |
| "<issue_comment>", | |
| "<issue_closed>", | |
| "<jupyter_start>", | |
| "<jupyter_text>", | |
| "<jupyter_code>", | |
| "<jupyter_output>", | |
| "<empty_output>", | |
| "<commit_before>", | |
| "<commit_msg>", | |
| "<commit_after>", | |
| "<reponame>" | |
| ], | |
| "bos_token": "<|endoftext|>", | |
| "clean_up_tokenization_spaces": true, | |
| "eos_token": "<|endoftext|>", | |
| "add_eos_token": true, | |
| "model_max_length": 1000000000000000019884624838656, | |
| "unk_token": "<|endoftext|>", | |
| "vocab_size": 49152, | |
| "tokenizer_class": "CodeSageTokenizer", | |
| "auto_map": { | |
| "AutoTokenizer": ["tokenization_codesage.CodeSageTokenizer", null] | |
| } | |
| } | |