Text Generation
Transformers
PyTorch
loleve
genomics
dna
language-model
causal-lm
biology
sequence-modeling
variant-prediction
promoter
indel
eqtl
custom_code
Instructions to use Marks-lab/LOL-EVE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Marks-lab/LOL-EVE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Marks-lab/LOL-EVE", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Marks-lab/LOL-EVE", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Marks-lab/LOL-EVE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Marks-lab/LOL-EVE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Marks-lab/LOL-EVE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Marks-lab/LOL-EVE
- SGLang
How to use Marks-lab/LOL-EVE 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 "Marks-lab/LOL-EVE" \ --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": "Marks-lab/LOL-EVE", "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 "Marks-lab/LOL-EVE" \ --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": "Marks-lab/LOL-EVE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Marks-lab/LOL-EVE with Docker Model Runner:
docker model run hf.co/Marks-lab/LOL-EVE
| #!/usr/bin/env python3 | |
| """ | |
| Example usage script for LOL-EVE model. | |
| This script demonstrates how to load and use the LOL-EVE model for genomic sequence analysis. | |
| """ | |
| import torch | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| def main(): | |
| print("🧬 LOL-EVE Example Usage") | |
| print("=" * 40) | |
| # Load model and tokenizer | |
| print("Loading model and tokenizer...") | |
| tokenizer = AutoTokenizer.from_pretrained('Marks-lab/LOL-EVE') | |
| model = AutoModelForCausalLM.from_pretrained('Marks-lab/LOL-EVE', trust_remote_code=True) | |
| print("✅ Model loaded successfully!") | |
| # Example 1: Basic DNA sequence | |
| print("\n1. Basic DNA Sequence Analysis") | |
| print("-" * 30) | |
| basic_sequence = "[MASK] [MASK] [MASK] [SOS]ATGCTAGCTAGCTAGCTAGCTA[EOS]" | |
| print(f"Input: {basic_sequence}") | |
| inputs = tokenizer(basic_sequence, return_tensors="pt") | |
| with torch.no_grad(): | |
| outputs = model(**inputs) | |
| print(f"Output shape: {outputs.logits.shape}") | |
| print(f"Sequence length: {outputs.logits.shape[1]} tokens") | |
| # Example 2: Control code sequence (recommended) | |
| print("\n2. Control Code Sequence Analysis") | |
| print("-" * 30) | |
| control_sequence = "brca1 human primate [SOS] ATGCTAGCTAGCTAGCTAGCTA [EOS]" | |
| print(f"Input: {control_sequence}") | |
| inputs = tokenizer(control_sequence, return_tensors="pt") | |
| with torch.no_grad(): | |
| outputs = model(**inputs) | |
| print(f"Output shape: {outputs.logits.shape}") | |
| print(f"Sequence length: {outputs.logits.shape[1]} tokens") | |
| # Example 3: Different gene | |
| print("\n3. Different Gene Analysis") | |
| print("-" * 30) | |
| tp53_sequence = "tp53 human primate [SOS] GATCGATCGATCGATCGATCGA [EOS]" | |
| print(f"Input: {tp53_sequence}") | |
| inputs = tokenizer(tp53_sequence, return_tensors="pt") | |
| with torch.no_grad(): | |
| outputs = model(**inputs) | |
| print(f"Output shape: {outputs.logits.shape}") | |
| print(f"Sequence length: {outputs.logits.shape[1]} tokens") | |
| print("\n" + "=" * 40) | |
| print("🎉 All examples completed successfully!") | |
| print("The model is ready for your genomic analysis tasks.") | |
| if __name__ == "__main__": | |
| main() | |