Instructions to use tmfi-us/Progenitor-V5-Final-LLaMa-70B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tmfi-us/Progenitor-V5-Final-LLaMa-70B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tmfi-us/Progenitor-V5-Final-LLaMa-70B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tmfi-us/Progenitor-V5-Final-LLaMa-70B") model = AutoModelForCausalLM.from_pretrained("tmfi-us/Progenitor-V5-Final-LLaMa-70B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tmfi-us/Progenitor-V5-Final-LLaMa-70B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tmfi-us/Progenitor-V5-Final-LLaMa-70B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tmfi-us/Progenitor-V5-Final-LLaMa-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tmfi-us/Progenitor-V5-Final-LLaMa-70B
- SGLang
How to use tmfi-us/Progenitor-V5-Final-LLaMa-70B 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 "tmfi-us/Progenitor-V5-Final-LLaMa-70B" \ --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": "tmfi-us/Progenitor-V5-Final-LLaMa-70B", "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 "tmfi-us/Progenitor-V5-Final-LLaMa-70B" \ --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": "tmfi-us/Progenitor-V5-Final-LLaMa-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tmfi-us/Progenitor-V5-Final-LLaMa-70B with Docker Model Runner:
docker model run hf.co/tmfi-us/Progenitor-V5-Final-LLaMa-70B
Update Feb 16, 2025 noon PST:
Upon debugging with the author of the original model, the author decided to redo the model as something is off with the weights. See discussion here.
NOTE: This means this repo's weights are also broken!
Update Feb 16, 2025 morning PST:
The author of the original model mentioned that this model gave very different outputs. See ongoing discussion here.
Overview
The original model had invalid tensor.Shape for weights ([1, 8192]), raising following errors when loading with transformers:
ValueError: Trying to set a tensor of shape torch.Size([1, 8192]) in "weight" (which has shape torch. Size ( [8192])), this looks incorrect.
So I resized them into [8192] with following script:
import os
from safetensors.torch import load_file, save_file
# Update this to point to your safetensors directory
MODEL_DIR = "/root/.cache/huggingface/hub/models--Tarek07--Progenitor-V5-Final-LLaMa-70B/snapshots/8ca900fd3a65a725902d525e518be1bf374c0247"
DEST_DIR = "/output/Progenitor-V5-Final-LLaMa-70B"
def fix_shard(shard_path, output_path):
# Load the shard
data = load_file(shard_path)
# data is a dict: key -> torch.Tensor
# Go through every tensor and fix the shape if necessary
for key, tensor in data.items():
# Check if the shape is (1, 8192) instead of (8192)
if list(tensor.shape) == [1, 8192]:
print(f" Fixing {key} in {os.path.basename(shard_path)} from {tensor.shape} to (8192,)")
# Either squeeze(0) or view(-1) or view(8192):
# data[key] = tensor.squeeze(0)
# or
data[key] = tensor.view(8192)
# Save the fixed shard to output_path
save_file(data, output_path, metadata={"format": "pt"})
print(f" -> Saved fixed shard to: {output_path}")
def main():
# Look for .safetensors files in MODEL_DIR
for filename in sorted(os.listdir(MODEL_DIR)):
if filename.endswith(".safetensors"):
shard_path = os.path.join(MODEL_DIR, filename)
output_path = os.path.join(DEST_DIR, f"{filename}")
print(f"Processing: {shard_path}")
fix_shard(shard_path, output_path)
if __name__ == "__main__":
main()
Original README.md from here:
This marks the culmination of my experiments with the Progenitor series. I fixed the typo I had earlier where it wasn't computing in float32, but 6 models in computed in float32 is a bit taxing on resources and time and so I left it for the configuration I thought was the best (it's not something I can afford to do with every model I make, just the worthwhile ones). This one also uses the Sicari's tokenizer which I find the best.
merge
This is a merge of pre-trained language models created using mergekit.
Merge Details
Merge Method
This model was merged using the Linear DELLA merge method using meta-llama/Llama-3.3-70B-Instruct as a base.
Models Merged
The following models were included in the merge:
- TheDrummer/Anubis-70B-v1
- EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1
- Sao10K/70B-L3.3-Cirrus-x1
- SicariusSicariiStuff/Negative_LLAMA_70B
- Sao10K/L3.1-70B-Hanami-x1
Configuration
The following YAML configuration was used to produce this model:
models:
- model: Sao10K/L3.1-70B-Hanami-x1
parameters:
weight: 0.20
density: 0.7
- model: Sao10K/70B-L3.3-Cirrus-x1
parameters:
weight: 0.20
density: 0.7
- model: SicariusSicariiStuff/Negative_LLAMA_70B
parameters:
weight: 0.20
density: 0.7
- model: TheDrummer/Anubis-70B-v1
parameters:
weight: 0.20
density: 0.7
- model: EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1
parameters:
weight: 0.20
density: 0.7
merge_method: della_linear
base_model: meta-llama/Llama-3.3-70B-Instruct
parameters:
epsilon: 0.2
lambda: 1.1
int8_mask: true
dtype: float32
out_dtype: bfloat16
tokenizer:
source: SicariusSicariiStuff/Negative_LLAMA_70B
- Downloads last month
- 3