|
Download README.md from eunJ/SKKU_secure_code_generation: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/eunJ/SKKU_secure_code_generation/resolve/main/README.md
- Command line
-
hf download hf://eunJ/SKKU_secure_code_generation/README.md
-
curl -L -o README.md https://huggingface.co/eunJ/SKKU_secure_code_generation/resolve/main/README.md
565 Bytes
| base_model: | |
| - meta-llama/Llama-3.1-8B | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| tokenizer = AutoTokenizer.from_pretrained(CKPT_PATH, padding_side="right") | |
| if tokenizer.pad_token is None: | |
| tokenizer.add_special_tokens({'pad_token': tokenizer.eos_token}) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| CKPT_PATH, | |
| torch_dtype=torch.bfloat16, | |
| device_map="auto", | |
| low_cpu_mem_usage=True, | |
| trust_remote_code=True | |
| ) | |
| if model.config.pad_token_id is None: | |
| model.config.pad_token_id = tokenizer.pad_token_id | |
| ``` |