ONNX Model Zoo

mgoin/Nous-Hermes-llama-2-7b-ds

By mgoin · ↓ 2 · ♥ 0 · Updated 2023-10-25

What's in this repo

This page lists the files in mgoin/Nous-Hermes-llama-2-7b-ds, including model-orig.onnx, model.onnx.

  • 2 ONNX models (.onnx files)
  • 9 files, including 4 .json, 2 .onnx, 1 .md, 1 .data
  • Last updated 2023-10-25

ONNX files

File Size Download
model-orig.onnx — Download
model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

from deepsparse import TextGeneration
model = TextGeneration(model="hf:mgoin/Nous-Hermes-llama-2-7b-ds")
prompt="""### Instruction:
Write a Perl script that processes a log file and counts the occurrences of different HTTP status codes. The script should accept the log file path as a command-line argument and print the results to the console in descending order of frequency.

### Response:
"""
print(model(prompt, max_new_tokens=500).generations[0].text)

Output:

#!/usr/bin/perl

use strict;
use warnings;

my $log_file = $ARGV[0];

open(my $fh, '<', $log_file) or die "Could not open file '$log_file' $!";

my %status_count;

while (my $line = <$fh>) {
    chomp $line;

    my @status_codes = split(/\s+/, $line);

    for my $status_code (@status_codes) {
        $status_count{$status_code}++;
    }
}

close($fh);

foreach my $status_code (sort { $status_count{$b} <=> $status_count{$a} } keys %status_count) {
    print "$status_code: $status_count{$status_code}\n";
}

Model info

text-generation transformers
transformers onnx llama text-generation deepsparse endpoints_compatible region:us
↓ 2 ♥ 0

Created: 2023-10-25

Updated: 2023-10-25

View on Hugging Face

Files (9)

.gitattributes
README.md
config.json
model-orig.onnx ONNX
model.data
model.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json

Related models