Instructions to use Nexus-Walker/Reson with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Nexus-Walker/Reson with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat-hf") model = PeftModel.from_pretrained(base_model, "Nexus-Walker/Reson") - Transformers
How to use Nexus-Walker/Reson with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nexus-Walker/Reson") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Nexus-Walker/Reson", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Nexus-Walker/Reson with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nexus-Walker/Reson" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nexus-Walker/Reson", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Nexus-Walker/Reson
- SGLang
How to use Nexus-Walker/Reson 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 "Nexus-Walker/Reson" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nexus-Walker/Reson", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Nexus-Walker/Reson" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nexus-Walker/Reson", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Nexus-Walker/Reson with Docker Model Runner:
docker model run hf.co/Nexus-Walker/Reson
Reson
Reson is an inference-only LoRA adapter for meta-llama/Llama-2-7b-chat-hf. It was trained on approximately 11,000 instruction/response pairs to explore reflective reasoning and strategy revision. The training data is not included here.
The adapter weights in this repository are preserved as published. They have not been merged into the base model or converted.
Files
adapter_model.safetensorsandadapter_config.json: the published adapter.tokenizer.*andchat_template.jinja: the tokenizer assets and chat format published with this adapter.training_logs/: historical training checkpoints. The benchmark uses only the top-level adapter.
Use
The base model is gated on Hugging Face. Request access from Meta and authenticate before loading it.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
base = "meta-llama/Llama-2-7b-chat-hf"
adapter = "Nexus-Walker/Reson"
tokenizer = AutoTokenizer.from_pretrained(base)
quantization = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4")
model = AutoModelForCausalLM.from_pretrained(
base,
quantization_config=quantization,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
License
Reson-authored documentation and helper code in this repository are MIT-licensed; see LICENSE. The adapter depends on Llama 2 and remains subject to Meta's Llama 2 Community License. LICENSE-LLAMA2 and its required attribution in NOTICE are included. Obtain the gated base model separately from Meta.
The model metadata identifies the adapter's Llama 2 license. No benchmark results are published here yet.
- Downloads last month
- 38
Model tree for Nexus-Walker/Reson
Base model
meta-llama/Llama-2-7b-chat-hf