Text Generation
Transformers
TensorBoard
Safetensors
biology
genomics
rna
sequence-generation
regression
reinforcement-learning
git-lfs
Instructions to use JoyXiangLab/rnaseek-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JoyXiangLab/rnaseek-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JoyXiangLab/rnaseek-full")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JoyXiangLab/rnaseek-full", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JoyXiangLab/rnaseek-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JoyXiangLab/rnaseek-full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JoyXiangLab/rnaseek-full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JoyXiangLab/rnaseek-full
- SGLang
How to use JoyXiangLab/rnaseek-full 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 "JoyXiangLab/rnaseek-full" \ --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": "JoyXiangLab/rnaseek-full", "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 "JoyXiangLab/rnaseek-full" \ --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": "JoyXiangLab/rnaseek-full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JoyXiangLab/rnaseek-full with Docker Model Runner:
docker model run hf.co/JoyXiangLab/rnaseek-full
| import sys, os | |
| sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from exllamav2 import ExLlamaV2, ExLlamaV2Config, ExLlamaV2Cache, ExLlamaV2Tokenizer | |
| from exllamav2.generator import ExLlamaV2DynamicGenerator, ExLlamaV2DynamicJob | |
| import pprint | |
| model_dir = "/mnt/str/models/mistral-7b-exl2/4.0bpw" | |
| config = ExLlamaV2Config(model_dir) | |
| config.arch_compat_overrides() | |
| model = ExLlamaV2(config) | |
| cache = ExLlamaV2Cache(model, lazy = True) | |
| model.load_autosplit(cache, progress = True) | |
| print("Loading tokenizer...") | |
| tokenizer = ExLlamaV2Tokenizer(config) | |
| # Initialize the generator with all default parameters | |
| generator = ExLlamaV2DynamicGenerator( | |
| model = model, | |
| cache = cache, | |
| tokenizer = tokenizer, | |
| ) | |
| # Start a generation job. We can add a number of arguments here like stop conditions, sample settings and more, but | |
| # for this demonstration we'll only enable token healing, which addresses the extraneous space at the end of the | |
| # prompt. | |
| prompt = "Our story begins in the Scottish town of Auchtermuchty, where " | |
| input_ids = tokenizer.encode(prompt, add_bos = False) | |
| job = ExLlamaV2DynamicJob( | |
| input_ids = input_ids, | |
| max_new_tokens = 200, | |
| token_healing = True | |
| ) | |
| generator.enqueue(job) | |
| # Stream output to the terminal | |
| print() | |
| print(prompt, end = ""); sys.stdout.flush() | |
| eos = False | |
| while not eos: | |
| # Run one iteration of the generator. Returns a list of results | |
| results = generator.iterate() | |
| for result in results: | |
| # If we enqueue multiple jobs, an iteration might produce results for any (or all) of them. We could direct | |
| # outputs to multiple clients here, using whatever dispatch mechanism, but in this example there will only be | |
| # outputs pertaining to the single job started above, and it will all go straight to the console. | |
| assert result["job"] == job | |
| # Prefilling/ingesting the prompt may happen over multiple iterations, during which the result will have | |
| # a "stage" value of "prefill". We can ignore those results and only use the "streaming" results that will | |
| # contain the actual output. | |
| if result["stage"] == "streaming": | |
| # Depending on settings, the result dict can contain top-K probabilities, logits and more, but we'll just | |
| # grab the output text stream. | |
| text = result.get("text", "") | |
| print(text, end = ""); sys.stdout.flush() | |
| # The "streaming" stage also emits the EOS signal when it occurs. If present, it will accompany a | |
| # summary of the job. Print the last packet here to illustrate. | |
| if result["eos"]: | |
| print() | |
| print() | |
| print("---------------------------------") | |
| print("Generation complete. Last result:") | |
| print() | |
| pprint.pprint(result, indent = 4) | |
| eos = True |