FinchResearch / llama2-stable-7b-lora

huggingface.co
Total runs: 30
24-hour runs: 0
7-day runs: 5
30-day runs: 22
Model's Last Updated: July 27 2023
question-answering

Introduction of llama2-stable-7b-lora

Model Details of llama2-stable-7b-lora

Here is a README.md explaining how to run the Archimedes model locally:

Archimedes Model

This README provides instructions for running the Archimedes conversational AI assistant locally.

Requirements

Install requirements:

!pip install transformers
!pip install peft
!pip install torch
!pip install datasets
!pip install bitsandbytes
Usage
import transformers
from peft import LoraConfig, get_peft_model  
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

login() # Need access to the gated model.

# Load LLAMA 2 model
model_name = "meta-llama/Llama-2-7b-chat-hf" 

# Quantization configuration 
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.float16,
)

# Load model
model = AutoModelForCausalLM.from_pretrained(
    model_name, 
    quantization_config=bnb_config,
    trust_remote_code=True
)

# Load LoRA configuration
lora_config = LoraConfig.from_pretrained('harpyerr/archimedes-300s-7b-chat')
model = get_peft_model(model, lora_config) 

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token

# Define prompt  
text = "Can you tell me who made Space-X?"
prompt = "You are a helpful assistant. Please provide an informative response. \n\n" + text

# Generate response
device = "cuda:0" 
inputs = tokenizer(prompt, return_tensors="pt").to(device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

This loads the LLAMA 2 model, applies 4-bit quantization and LoRA optimizations, constructs a prompt, and generates a response.

See the docs for more details.

Runs of FinchResearch llama2-stable-7b-lora on huggingface.co

30
Total runs
0
24-hour runs
0
3-day runs
5
7-day runs
22
30-day runs

More Information About llama2-stable-7b-lora huggingface.co Model

More llama2-stable-7b-lora license Visit here:

https://choosealicense.com/licenses/mit

llama2-stable-7b-lora huggingface.co

llama2-stable-7b-lora huggingface.co is an AI model on huggingface.co that provides llama2-stable-7b-lora's model effect (), which can be used instantly with this FinchResearch llama2-stable-7b-lora model. huggingface.co supports a free trial of the llama2-stable-7b-lora model, and also provides paid use of the llama2-stable-7b-lora. Support call llama2-stable-7b-lora model through api, including Node.js, Python, http.

llama2-stable-7b-lora huggingface.co Url

https://huggingface.co/FinchResearch/llama2-stable-7b-lora

FinchResearch llama2-stable-7b-lora online free

llama2-stable-7b-lora huggingface.co is an online trial and call api platform, which integrates llama2-stable-7b-lora's modeling effects, including api services, and provides a free online trial of llama2-stable-7b-lora, you can try llama2-stable-7b-lora online for free by clicking the link below.

FinchResearch llama2-stable-7b-lora online free url in huggingface.co:

https://huggingface.co/FinchResearch/llama2-stable-7b-lora

llama2-stable-7b-lora install

llama2-stable-7b-lora is an open source model from GitHub that offers a free installation service, and any user can find llama2-stable-7b-lora on GitHub to install. At the same time, huggingface.co provides the effect of llama2-stable-7b-lora install, users can directly use llama2-stable-7b-lora installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

llama2-stable-7b-lora install url in huggingface.co:

https://huggingface.co/FinchResearch/llama2-stable-7b-lora

Url of llama2-stable-7b-lora

llama2-stable-7b-lora huggingface.co Url

Provider of llama2-stable-7b-lora huggingface.co

FinchResearch
ORGANIZATIONS

Other API from FinchResearch

huggingface.co

Total runs: 14
Run Growth: 8
Growth Rate: 57.14%
Updated:September 04 2023
huggingface.co

Total runs: 13
Run Growth: 6
Growth Rate: 46.15%
Updated:September 04 2023
huggingface.co

Total runs: 12
Run Growth: 4
Growth Rate: 33.33%
Updated:September 04 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 02 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 30 2023