Instructions to use jinyuan22/RFamLlama-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinyuan22/RFamLlama-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jinyuan22/RFamLlama-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jinyuan22/RFamLlama-large") model = AutoModelForCausalLM.from_pretrained("jinyuan22/RFamLlama-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jinyuan22/RFamLlama-large with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jinyuan22/RFamLlama-large" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jinyuan22/RFamLlama-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jinyuan22/RFamLlama-large
- SGLang
How to use jinyuan22/RFamLlama-large with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jinyuan22/RFamLlama-large" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jinyuan22/RFamLlama-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jinyuan22/RFamLlama-large" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jinyuan22/RFamLlama-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jinyuan22/RFamLlama-large with Docker Model Runner:
docker model run hf.co/jinyuan22/RFamLlama-large
Download tokenizer.json from jinyuan22/RFamLlama-large: direct link, hf CLI and curl.
- Browser
- Download file 2.36 kB
-
https://huggingface.co/jinyuan22/RFamLlama-large/resolve/main/tokenizer.json
- Command line
-
hf download hf://jinyuan22/RFamLlama-large/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/jinyuan22/RFamLlama-large/resolve/main/tokenizer.json
2.36 kB
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "<|pad|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "<|bos|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "<|eos|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "<|tag_start|>", | |
| "single_word": true, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| { | |
| "id": 4, | |
| "content": "<|tag_end|>", | |
| "single_word": true, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| { | |
| "id": 5, | |
| "content": "<|5|>", | |
| "single_word": true, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| { | |
| "id": 6, | |
| "content": "<|3|>", | |
| "single_word": true, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| } | |
| ], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "post_processor": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "decoder": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "model": { | |
| "type": "BPE", | |
| "dropout": null, | |
| "unk_token": null, | |
| "continuing_subword_prefix": null, | |
| "end_of_word_suffix": null, | |
| "fuse_unk": false, | |
| "byte_fallback": false, | |
| "vocab": { | |
| "<|pad|>": 0, | |
| "<|bos|>": 1, | |
| "<|eos|>": 2, | |
| "<|tag_start|>": 3, | |
| "<|tag_end|>": 4, | |
| "<|5|>": 5, | |
| "<|3|>": 6, | |
| "0": 7, | |
| "1": 8, | |
| "2": 9, | |
| "3": 10, | |
| "4": 11, | |
| "5": 12, | |
| "6": 13, | |
| "7": 14, | |
| "8": 15, | |
| "9": 16, | |
| "A": 17, | |
| "T": 18, | |
| "C": 19, | |
| "G": 20, | |
| "N": 21 | |
| }, | |
| "merges": [] | |
| } | |
| } |