This model is a fine-tuned version of
EleutherAI/pythia-6.9b-deduped on the pszemraj/HC3-textgen-qa dataset.
It achieves the following results on the evaluation set:
Text generation model trained on the HC3 text data of human questions + chatGPT answers.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("pszemraj/pythia-6.9b-HC3")
4
5model = AutoModelForCausalLM.from_pretrained(
6 "pszemraj/pythia-6.9b-HC3", load_in_8bit=True, device_map="auto"
7) # shards are ~4GB each, there are eight total
8
9prompt = "I was wondering how much wood a woodchuck could chuck? <answer>"
10inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
11outputs = model.generate(
12 **inputs, max_new_tokens=300
13) # default generation config (+ 300 tokens)
14result = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
15result = result.split("<end_answer>")[0].strip()
16
17import pprint as pp
18
19pp.pprint(result)
The defautl
GenerationConfig uses contrastive search with
top_k=4 and
penalty_alpha=0.6. For more information on inference and parameters to use, see
the transformers docs.
1model-index:
2- name: pythia-6.9b-hc3-qa-assistant
3 results:
4 - task:
5 name: Causal Language Modeling
6 type: text-generation
7 dataset:
8 name: pszemraj/HC3-textgen-qa
9 metrics:
10 - name: Accuracy
11 type: accuracy
12 value: 0.6768941789814655
Detailed results can be found
here