Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) astrollama - GGUF - Model creator: https://huggingface.co/universeTBD/ - Original model: https://huggingface.co/universeTBD/astrollama/ | Name | Quant method | Size | | ---- | ---- | ---- | | [astrollama.Q2_K.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q2_K.gguf) | Q2_K | 2.36GB | | [astrollama.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.IQ3_XS.gguf) | IQ3_XS | 2.6GB | | [astrollama.IQ3_S.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.IQ3_S.gguf) | IQ3_S | 2.75GB | | [astrollama.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q3_K_S.gguf) | Q3_K_S | 2.75GB | | [astrollama.IQ3_M.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.IQ3_M.gguf) | IQ3_M | 2.9GB | | [astrollama.Q3_K.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q3_K.gguf) | Q3_K | 3.07GB | | [astrollama.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q3_K_M.gguf) | Q3_K_M | 3.07GB | | [astrollama.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q3_K_L.gguf) | Q3_K_L | 3.35GB | | [astrollama.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.IQ4_XS.gguf) | IQ4_XS | 3.4GB | | [astrollama.Q4_0.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q4_0.gguf) | Q4_0 | 3.56GB | | [astrollama.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.IQ4_NL.gguf) | IQ4_NL | 3.58GB | | [astrollama.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q4_K_S.gguf) | Q4_K_S | 3.59GB | | [astrollama.Q4_K.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q4_K.gguf) | Q4_K | 3.8GB | | [astrollama.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q4_K_M.gguf) | Q4_K_M | 3.8GB | | [astrollama.Q4_1.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q4_1.gguf) | Q4_1 | 3.95GB | | [astrollama.Q5_0.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q5_0.gguf) | Q5_0 | 4.33GB | | [astrollama.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q5_K_S.gguf) | Q5_K_S | 4.33GB | | [astrollama.Q5_K.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q5_K.gguf) | Q5_K | 4.45GB | | [astrollama.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q5_K_M.gguf) | Q5_K_M | 4.45GB | | [astrollama.Q5_1.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q5_1.gguf) | Q5_1 | 4.72GB | | [astrollama.Q6_K.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/astrollama.Q6_K.gguf) | Q6_K | 5.15GB | | [astrollama.Q8_0.gguf](https://huggingface.co/RichardErkhov/universeTBD_-_astrollama-gguf/blob/main/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 ```python 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 ```python 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 ```python 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() ```