GGUF
How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf RichardErkhov/universeTBD_-_astrollama-gguf:
# Run inference directly in the terminal:
llama cli -hf RichardErkhov/universeTBD_-_astrollama-gguf:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf RichardErkhov/universeTBD_-_astrollama-gguf:
# Run inference directly in the terminal:
llama cli -hf RichardErkhov/universeTBD_-_astrollama-gguf:
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 RichardErkhov/universeTBD_-_astrollama-gguf:
# Run inference directly in the terminal:
./llama-cli -hf RichardErkhov/universeTBD_-_astrollama-gguf:
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 RichardErkhov/universeTBD_-_astrollama-gguf:
# Run inference directly in the terminal:
./build/bin/llama-cli -hf RichardErkhov/universeTBD_-_astrollama-gguf:
Use Docker
docker model run hf.co/RichardErkhov/universeTBD_-_astrollama-gguf:
Quick Links

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Quantization made by Richard Erkhov.

Github

Discord

Request more models

astrollama - GGUF

Name Quant method Size
astrollama.Q2_K.gguf Q2_K 2.36GB
astrollama.IQ3_XS.gguf IQ3_XS 2.6GB
astrollama.IQ3_S.gguf IQ3_S 2.75GB
astrollama.Q3_K_S.gguf Q3_K_S 2.75GB
astrollama.IQ3_M.gguf IQ3_M 2.9GB
astrollama.Q3_K.gguf Q3_K 3.07GB
astrollama.Q3_K_M.gguf Q3_K_M 3.07GB
astrollama.Q3_K_L.gguf Q3_K_L 3.35GB
astrollama.IQ4_XS.gguf IQ4_XS 3.4GB
astrollama.Q4_0.gguf Q4_0 3.56GB
astrollama.IQ4_NL.gguf IQ4_NL 3.58GB
astrollama.Q4_K_S.gguf Q4_K_S 3.59GB
astrollama.Q4_K.gguf Q4_K 3.8GB
astrollama.Q4_K_M.gguf Q4_K_M 3.8GB
astrollama.Q4_1.gguf Q4_1 3.95GB
astrollama.Q5_0.gguf Q5_0 4.33GB
astrollama.Q5_K_S.gguf Q5_K_S 4.33GB
astrollama.Q5_K.gguf Q5_K 4.45GB
astrollama.Q5_K_M.gguf Q5_K_M 4.45GB
astrollama.Q5_1.gguf Q5_1 4.72GB
astrollama.Q6_K.gguf Q6_K 5.15GB
astrollama.Q8_0.gguf Q8_0 6.67GB

Original model description:

license: mit datasets: - universeTBD/arxiv-astro-abstracts-all language: - en metrics: - perplexity pipeline_tag: text-generation tags: - llama-2 - astronomy - astrophysics - arxiv inference: false

AstroLLaMA

Play with the model in our Hugging Face space! https://huggingface.co/spaces/universeTBD/astrollama

AstroLLaMA

Loading the model

from transformers import AutoModelForCausalLM
from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(
    pretrained_model_name_or_path="universeTBD/astrollama"
)
model = AutoModelForCausalLM.from_pretrained(
    pretrained_model_name_or_path="universeTBD/astrollama",
    device_map="auto",
)

Generating text from a prompt

import torch
from transformers import pipeline

generator = pipeline(
    task="text-generation",
    model=model,
    tokenizer=tokenizer,
    device_map="auto"
)

# Taken from https://arxiv.org/abs/2308.12823
prompt = "In this letter, we report the discovery of the highest redshift, " \
    "heavily obscured, radio-loud QSO candidate selected using JWST NIRCam/MIRI, " \
    "mid-IR, sub-mm, and radio imaging in the COSMOS-Web field. "

# For reproducibility
torch.manual_seed(42)

generated_text = generator(
    prompt,
    do_sample=True,
    max_length=512
)

Embedding text with AstroLLaMA

texts = [
    "Abstract 1",
    "Abstract 2"
]
inputs = tokenizer(
    texts,
    return_tensors="pt",
    return_token_type_ids=False,
    padding=True,
    truncation=True,
    max_length=4096
)
inputs.to(model.device)
outputs = model(**inputs, output_hidden_states=True)

# Last layer of the hidden states. Get average embedding of all tokens
embeddings = outputs["hidden_states"][-1][:, 1:, ...].mean(1).detach().cpu().numpy()
Downloads last month
236
GGUF
Model size
7B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for RichardErkhov/universeTBD_-_astrollama-gguf