singtan commited on
Commit
fbbccdc
·
verified ·
1 Parent(s): 8bdabf8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -34,16 +34,16 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
34
  model = AutoModelForCausalLM.from_pretrained(model_id, device_map='auto', torch_dtype=torch.float16)
35
 
36
  # Universal Grounding Template
37
- instruction = 'Analyze the document and provide a precise response based strictly on the content provided.'
38
- source_doc = 'Architecture_Spec.pdf'
39
  query = 'What are the main infrastructure requirements?'
40
 
 
 
 
 
41
  prompt = (f'### Instruction: {instruction}
42
  '
43
- f'### Source: {source_doc}
44
- '
45
- f'### Content: {query}
46
- '
47
  f'### Verified Response:')
48
 
49
  inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
 
34
  model = AutoModelForCausalLM.from_pretrained(model_id, device_map='auto', torch_dtype=torch.float16)
35
 
36
  # Universal Grounding Template
37
+ instruction = 'Analyze the following document and provide a precise, factual response based strictly on the content provided. If the information is not present, you must state that it is not documented.'
 
38
  query = 'What are the main infrastructure requirements?'
39
 
40
+ prompt = (f'### Instruction: {instruction}\n'
41
+ f'### Knowledge Context: {query}\n'
42
+ f'### Verified Response:')
43
+
44
  prompt = (f'### Instruction: {instruction}
45
  '
46
+ ### Knowledge Context: Extract the overview and key details from this document.
 
 
 
47
  f'### Verified Response:')
48
 
49
  inputs = tokenizer(prompt, return_tensors='pt').to(model.device)