Instructions to use alinaryan/merlinite-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alinaryan/merlinite-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alinaryan/merlinite-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alinaryan/merlinite-7b") model = AutoModelForCausalLM.from_pretrained("alinaryan/merlinite-7b") - llama-cpp-python
How to use alinaryan/merlinite-7b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="alinaryan/merlinite-7b", filename="release-040424.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use alinaryan/merlinite-7b with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf alinaryan/merlinite-7b # Run inference directly in the terminal: llama-cli -hf alinaryan/merlinite-7b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf alinaryan/merlinite-7b # Run inference directly in the terminal: llama-cli -hf alinaryan/merlinite-7b
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf alinaryan/merlinite-7b # Run inference directly in the terminal: ./llama-cli -hf alinaryan/merlinite-7b
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf alinaryan/merlinite-7b # Run inference directly in the terminal: ./build/bin/llama-cli -hf alinaryan/merlinite-7b
Use Docker
docker model run hf.co/alinaryan/merlinite-7b
- LM Studio
- Jan
- vLLM
How to use alinaryan/merlinite-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alinaryan/merlinite-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alinaryan/merlinite-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/alinaryan/merlinite-7b
- SGLang
How to use alinaryan/merlinite-7b 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 "alinaryan/merlinite-7b" \ --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": "alinaryan/merlinite-7b", "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 "alinaryan/merlinite-7b" \ --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": "alinaryan/merlinite-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use alinaryan/merlinite-7b with Ollama:
ollama run hf.co/alinaryan/merlinite-7b
- Unsloth Studio new
How to use alinaryan/merlinite-7b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for alinaryan/merlinite-7b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for alinaryan/merlinite-7b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for alinaryan/merlinite-7b to start chatting
- Docker Model Runner
How to use alinaryan/merlinite-7b with Docker Model Runner:
docker model run hf.co/alinaryan/merlinite-7b
- Lemonade
How to use alinaryan/merlinite-7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull alinaryan/merlinite-7b
Run and chat with the model
lemonade run user.merlinite-7b-{{QUANT_TAG}}List all available models
lemonade list
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Labrador Synthetic Data Generation Pipeline
Introduction
This repository contains the Labrador synthetic data generation pipeline, which is used to generate synthetic data for various purposes.
Run Instructions (Automation)
Step 1: Environment Setup
- Initialize a
.envfile with the following access tokens:GIT_ACCESS_TOKEN={ACCESS-TOKEN-TO-ACCESS-TAXONOMY-REPO} # this personal access token is used to access instruct-lab/taxonomy repo
Step 2: Execution
To run the pipeline:
Execute the following command:
NOTE: Depending on whether you are running on old or new vela, change this line in the orchestrator.py to use the appropriate old vela or new vela template.
save_job_with_jinja_template(cfg, "templates/labrador_datagen_vela.yaml.j2", output_dir=f"jobs/{branch}")python orchestrator.py branch-nameThis will:
- Create a file with a list of leaf nodes in the
jobsdirectory. - Generate YAML files for each leaf node and store them in the
jobsdirectory something liketest-7984f9cae729b798bed1ba222715b880.yaml
- Create a file with a list of leaf nodes in the
To initiate the skill generation pipeline, run:
To trigger a job, take the above yaml and
oc create -f jobs/yaml_name.yamlThis command will execute the pipeline and store the results in the
new_data/labrador-datagendirectory within the COS bucket mounted on the Vela cluster.
Run Instructions (Manual - Testing)
Step 1: Run model
Run teacher model - this model can be replaced with any small model for testing purposes
text-generation-launcher -p 8080 --model-id mistralai/Mixtral-8x7B-Instruct-v0.1 --dtype bfloat16 --max-input-length 4096 --max-batch-prefill-tokens 4096 --max-total-tokens 12288
Next, set the following enviornment variables:
LEAF_NODE=knowledge/textbooks/ethics/qna.yaml # Path to the leaf node that you want to download
NUM_SAMPLES=30
NUM_GROUNDED_QUESTIONS=3
NUM_GEN_PROC=32
NUM_UTIL_PROC=8
SAVE_PATH=new_data/labrador_datagen # Path where you want to download the data
CONTEXT=0 # Set 0 for freeform and 1 for grounded
DATA_PATH=.
CHECKSUM=test
BRANCH_NAME=test # Branch name to download data from
KNOWLEDGE=1 # Set 0 for skills and 1 for knowledge
PARENT_DIR=$(dirname "$LEAF_NODE")
GIT_ACCESS_TOKEN= # Access token to access taxonomy repo
Skills
Download data
wget --header "Authorization: token $GIT_ACCESS_TOKEN" --directory-prefix="$DATA_PATH/$PARENT_DIR" "https://raw.githubusercontent.com/instruct-lab/taxonomy/$BRANCH_NAME/$LEAF_NODE"
Run the Justfile using:
just run
The Justfile will check the context value. If the context is set to 1, it will run scripts for grounded data generation. If the context is set to 0, it will run scripts for freeform data generation and save the generated files in the root of the repo in the same directory structure.
Knowledge
Download data
bash download_docs.sh
Run knowledge script
python knowledge_generation_pipeline.py
- Downloads last month
- 18