Text Generation
Transformers
Safetensors
llama
dna
genomics
biology
causal-lm
text-generation-inference
Instructions to use rubenich/genetic-dna-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rubenich/genetic-dna-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rubenich/genetic-dna-tiny")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rubenich/genetic-dna-tiny") model = AutoModelForCausalLM.from_pretrained("rubenich/genetic-dna-tiny", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rubenich/genetic-dna-tiny with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rubenich/genetic-dna-tiny" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rubenich/genetic-dna-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rubenich/genetic-dna-tiny
- SGLang
How to use rubenich/genetic-dna-tiny 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 "rubenich/genetic-dna-tiny" \ --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": "rubenich/genetic-dna-tiny", "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 "rubenich/genetic-dna-tiny" \ --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": "rubenich/genetic-dna-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rubenich/genetic-dna-tiny with Docker Model Runner:
docker model run hf.co/rubenich/genetic-dna-tiny
Download tokenizer.json from rubenich/genetic-dna-tiny: direct link, hf CLI and curl.
- Browser
- Download file 2.91 kB
-
https://huggingface.co/rubenich/genetic-dna-tiny/resolve/main/tokenizer.json
- Command line
-
hf download hf://rubenich/genetic-dna-tiny/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/rubenich/genetic-dna-tiny/resolve/main/tokenizer.json
2.91 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": "[UNK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "[BOS]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "[EOS]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": { | |
| "type": "Sequence", | |
| "normalizers": [ | |
| { | |
| "type": "Replace", | |
| "pattern": { | |
| "String": "a" | |
| }, | |
| "content": "A" | |
| }, | |
| { | |
| "type": "Replace", | |
| "pattern": { | |
| "String": "c" | |
| }, | |
| "content": "C" | |
| }, | |
| { | |
| "type": "Replace", | |
| "pattern": { | |
| "String": "g" | |
| }, | |
| "content": "G" | |
| }, | |
| { | |
| "type": "Replace", | |
| "pattern": { | |
| "String": "t" | |
| }, | |
| "content": "T" | |
| }, | |
| { | |
| "type": "Replace", | |
| "pattern": { | |
| "String": "n" | |
| }, | |
| "content": "N" | |
| }, | |
| { | |
| "type": "Replace", | |
| "pattern": { | |
| "Regex": "[^ACGTN]" | |
| }, | |
| "content": "N" | |
| } | |
| ] | |
| }, | |
| "pre_tokenizer": { | |
| "type": "Split", | |
| "pattern": { | |
| "Regex": "." | |
| }, | |
| "behavior": "Isolated", | |
| "invert": false | |
| }, | |
| "post_processor": { | |
| "type": "TemplateProcessing", | |
| "single": [ | |
| { | |
| "SpecialToken": { | |
| "id": "[BOS]", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "SpecialToken": { | |
| "id": "[EOS]", | |
| "type_id": 0 | |
| } | |
| } | |
| ], | |
| "pair": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "B", | |
| "type_id": 1 | |
| } | |
| } | |
| ], | |
| "special_tokens": { | |
| "[BOS]": { | |
| "id": "[BOS]", | |
| "ids": [ | |
| 2 | |
| ], | |
| "tokens": [ | |
| "[BOS]" | |
| ] | |
| }, | |
| "[EOS]": { | |
| "id": "[EOS]", | |
| "ids": [ | |
| 3 | |
| ], | |
| "tokens": [ | |
| "[EOS]" | |
| ] | |
| } | |
| } | |
| }, | |
| "decoder": { | |
| "type": "Fuse" | |
| }, | |
| "model": { | |
| "type": "WordLevel", | |
| "vocab": { | |
| "[PAD]": 0, | |
| "[UNK]": 1, | |
| "[BOS]": 2, | |
| "[EOS]": 3, | |
| "A": 4, | |
| "C": 5, | |
| "G": 6, | |
| "T": 7, | |
| "N": 8 | |
| }, | |
| "unk_token": "[UNK]" | |
| } | |
| } |