McClain/PlasmidLM-Eval
Viewer โข Updated โข 122 โข 17
How to use McClain/naive-dna-llama-6mer with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="McClain/naive-dna-llama-6mer") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("McClain/naive-dna-llama-6mer")
model = AutoModelForCausalLM.from_pretrained("McClain/naive-dna-llama-6mer", device_map="auto")How to use McClain/naive-dna-llama-6mer with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "McClain/naive-dna-llama-6mer"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "McClain/naive-dna-llama-6mer",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/McClain/naive-dna-llama-6mer
How to use McClain/naive-dna-llama-6mer with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "McClain/naive-dna-llama-6mer" \
--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": "McClain/naive-dna-llama-6mer",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "McClain/naive-dna-llama-6mer" \
--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": "McClain/naive-dna-llama-6mer",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use McClain/naive-dna-llama-6mer with Docker Model Runner:
docker model run hf.co/McClain/naive-dna-llama-6mer
Randomly initialized LLaMA model for DNA sequence generation using a custom 6-mer tokenizer (A,C,G,T) with stride 2.
This repository contains:
tokenization_naive_dna_kmer.py) implementing 6-mer tokenization with stride 2auto_map so AutoTokenizer.from_pretrained(..., trust_remote_code=True) worksLlamaForCausalLM config and weights sized per the provided hyperparametersIntended usage:
Example:
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "McClain/naive-dna-llama-6mer"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
Notes:
For trained promptable plasmid models and post-training code, see McClain/PlasmidLM-kmer6-GRPO-plannotate and McClain-Thiel/PlasmidLLM.
@article{thiel2026plasmidlm,
title = {{PlasmidLM}: A Promptable {DNA} Language Model via Verifiable-Reward Post-Training},
author = {Thiel, McClain and Barnes, Chris P.},
journal = {bioRxiv},
year = {2026},
doi = {10.64898/2026.05.19.725242},
url = {https://doi.org/10.64898/2026.05.19.725242},
}