Views
No views yet
Answer: [answer] Reference: [reference_answer] Question: [question][answer], [reference_answer] and [question] should be replaced by the provided answer, the reference answer and the question to which they refer, respectively.[verification_feedback] Feedback: [feedback][verification_feedback] label will be one of Correct, Partially correct or Incorrect, while [feedback] will be the textual feedback generated by the model according to the given answer.| Split | Number of examples |
|---|---|
| train | 1700 |
| validation | 427 |
| test_unseen_answers | 375 |
| test_unseen_questions | 479 |
test_unseen_answers and test_unseen_questions splits.| Split | SacreBLEU | ROUGE-2 | METEOR | BERTScore | Accuracy | Weighted F1 | Macro F1 |
|---|---|---|---|---|---|---|---|
| test_unseen_answers | 36.0 | 49.1 | 60.8 | 69.5 | 76.0 | 73.0 | 53.4 |
| test_unseen_questions | 2.4 | 20.1 | 28.5 | 36.6 | 51.6 | 41.0 | 27.9 |
evaluation.py file in this repository.1from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2
3model = AutoModelForSeq2SeqLM.from_pretrained('Short-Answer-Feedback/bart-finetuned-saf-communication-networks')
4tokenizer = AutoTokenizer.from_pretrained('Short-Answer-Feedback/bart-finetuned-saf-communication-networks')
5
6example_input = 'Answer: In TCP there is a Sequence Number field to identify packets individually for reliability. There is no Sequence Number in UDP. The UDP header does not have an options field, while the TCP header does. In TCP there is an Advertised Window field for the Sliding Window Protocol for Flow Control. There is no Flow Control and therefore no Advertised Window field in UDP. In TCP there there is only a Data Offset field that specifies the header length. In UDP the whole Packet Length is transmitted. Reference: Possible Differences : The UPD header (8 bytes) is much shorter than the TCP header (20-60 bytes) The UDP header has a fixed length while the TCP header has a variable length Fields contained in the TCP header and not the UDP header : -Sequence number -Acknowledgment number -Reserved -Flags/Control bits -Advertised window -Urgent Pointer -Options + Padding if the options are UDP includes the packet length (data + header) while TCP has the header length/data offset (just header) field instead The sender port field is optional in UDP, while the source port in TCP is necessary to establish the connection Question: State at least 4 of the differences shown in the lecture between the UDP and TCP headers.'
7inputs = tokenizer(example_input, max_length=256, padding='max_length', truncation=True, return_tensors='pt')
8
9generated_tokens = model.generate(
10 inputs['input_ids'],
11 attention_mask=inputs['attention_mask'],
12 max_length=128
13 )
14output = tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0]Correct Feedback: The response correctly identifies four differences between TCP and UDP headers.