Instructions to use luna-code/sqlmodel-CodeGPT-small-py-prefix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use luna-code/sqlmodel-CodeGPT-small-py-prefix with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/CodeGPT-small-py") model = PeftModel.from_pretrained(base_model, "luna-code/sqlmodel-CodeGPT-small-py-prefix") - Notebooks
- Google Colab
- Kaggle
Download adapter_config.json from luna-code/sqlmodel-CodeGPT-small-py-prefix: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/luna-code/sqlmodel-CodeGPT-small-py-prefix/resolve/main/adapter_config.json
- Command line
-
hf download hf://luna-code/sqlmodel-CodeGPT-small-py-prefix/adapter_config.json
-
curl -L -o adapter_config.json https://huggingface.co/luna-code/sqlmodel-CodeGPT-small-py-prefix/resolve/main/adapter_config.json
382 Bytes
| { | |
| "auto_mapping": null, | |
| "base_model_name_or_path": "microsoft/CodeGPT-small-py", | |
| "encoder_hidden_size": 768, | |
| "inference_mode": true, | |
| "num_attention_heads": 12, | |
| "num_layers": 12, | |
| "num_transformer_submodules": 1, | |
| "num_virtual_tokens": 5, | |
| "peft_type": "PREFIX_TUNING", | |
| "prefix_projection": false, | |
| "revision": null, | |
| "task_type": "CAUSAL_LM", | |
| "token_dim": 768 | |
| } |