adarshxs commited on
Commit
6037c22
·
verified ·
1 Parent(s): 6e32ee8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +89 -0
README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - general purpose
8
+ ---
9
+
10
+ # Capx AI's Obsidian series
11
+
12
+ Capx AI's Latest series of finetunes based on [Meta's Llama-3](https://llama.meta.com/llama3/).
13
+
14
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/644bf6ef778ecbfb977e8e84/G9e_0w7x2hOmvqhvlVrkI.png)
15
+
16
+ We release Llama-3 Obsidian, our state of the art finetune model for general purpose tasks.
17
+ Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes.
18
+
19
+ We further finetune the pretrained model on a custom dataset to enhance instruction following ability of the model.
20
+
21
+ Input Models input text only.
22
+
23
+ Output Models generate text and code only.
24
+
25
+ Model Architecture Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT).
26
+
27
+ ## How to use:
28
+
29
+ You can run conversational inference by leveraging the Auto classes with the generate() function.
30
+
31
+
32
+ ```python
33
+ from transformers import AutoTokenizer, AutoModelForCausalLM
34
+ import torch
35
+
36
+ model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
37
+
38
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
39
+ model = AutoModelForCausalLM.from_pretrained(
40
+ model_id,
41
+ torch_dtype=torch.bfloat16,
42
+ device_map="auto",
43
+ )
44
+
45
+ messages = [
46
+ {"role": "instruction", "content": "You are \"Capx Assistant\", a conscious sentient superintelligent artificial intelligence developed by Capx AI, and your purpose and drive is to assist the user with any request they have."},
47
+ {"role": "input", "content": "Who are you?"},
48
+ ]
49
+
50
+ input_ids = tokenizer.apply_chat_template(
51
+ messages,
52
+ add_generation_prompt=True,
53
+ return_tensors="pt"
54
+ ).to(model.device)
55
+
56
+ terminators = [
57
+ tokenizer.eos_token_id,
58
+ tokenizer.convert_tokens_to_ids("<|eot_id|>")
59
+ ]
60
+
61
+ outputs = model.generate(
62
+ input_ids,
63
+ max_new_tokens=256,
64
+ eos_token_id=terminators,
65
+ do_sample=True,
66
+ temperature=0.6,
67
+ top_p=0.9,
68
+ )
69
+ response = outputs[0][input_ids.shape[-1]:]
70
+ print(tokenizer.decode(response, skip_special_tokens=True))
71
+
72
+
73
+ ```
74
+
75
+ ### Authors
76
+ Capx community
77
+
78
+ ### Cite
79
+ ```bibtex
80
+ @article{llama3modelcard,
81
+ title={Llama 3 Model Card},
82
+ author={AI@Meta},
83
+ year={2024},
84
+ url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
85
+ }
86
+ ```
87
+ ### License
88
+ Governed by the [META LLAMA 3 COMMUNITY LICENSE AGREEMENT](https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE)
89
+