Instructions to use Allanatrix/Nexa-OLMo-sci7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Allanatrix/Nexa-OLMo-sci7b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("allenai/OLMo-7B") model = PeftModel.from_pretrained(base_model, "Allanatrix/Nexa-OLMo-sci7b") - Transformers
How to use Allanatrix/Nexa-OLMo-sci7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Allanatrix/Nexa-OLMo-sci7b")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Allanatrix/Nexa-OLMo-sci7b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Allanatrix/Nexa-OLMo-sci7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Allanatrix/Nexa-OLMo-sci7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Allanatrix/Nexa-OLMo-sci7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Allanatrix/Nexa-OLMo-sci7b
- SGLang
How to use Allanatrix/Nexa-OLMo-sci7b 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 "Allanatrix/Nexa-OLMo-sci7b" \ --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": "Allanatrix/Nexa-OLMo-sci7b", "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 "Allanatrix/Nexa-OLMo-sci7b" \ --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": "Allanatrix/Nexa-OLMo-sci7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Allanatrix/Nexa-OLMo-sci7b with Docker Model Runner:
docker model run hf.co/Allanatrix/Nexa-OLMo-sci7b
Model Card for nexa-OLMo-sci7b
Model Details
Model Description:
nexa-OLMo-sci7b is a fine-tuned variant of allenai/OLMo-7B, optimized for scientific research generation tasks such as hypothesis generation, abstract writing, and methodology completion. Fine-tuning was performed using PEFT with LoRA in 4-bit quantized mode via bitsandbytes.
Developed by: Allan (Independent Scientific Intelligence Architect)
Shared by: Allan (https://huggingface.co/allan-wandia)
Model type: Decoder-only transformer (causal language model)
Language(s): English (scientific domain-specific vocabulary)
License: Apache 2.0
Fine-tuned from: allenai/OLMo-7B
Repository: https://huggingface.co/allan-wandia/nexa-olmo-sci7b
Training Details
Training Data:
- Size: 100 million tokens
- Source: Curated scientific literature (Bio, Physics, QST, Astro)
Hyperparameters:
- Sequence length: 1024
- Batch size: 1
- Gradient Accumulation Steps: 64
- Effective Batch Size: 64
- Learning rate: 2e-05
- Epochs: 2
- LoRA: Enabled (PEFT)
- Quantization: 4-bit
Results:
Robust performance in scientific prose tasks, with novelty varying by prompt diversity.
- Downloads last month
- 2
Model tree for Allanatrix/Nexa-OLMo-sci7b
Base model
allenai/OLMo-7B