Views
No views yet

Q: <question>
A: <answer>qa_data.jsonl which includes question–answer pairs from the InferenceVision project. This dataset was split into a 90% training set and 10% evaluation set using Hugging Face's train_test_split. The NVIDIA A100 GPU utilized for the training process with 40GB VRAM.Q: <question>
A: <answer>EleutherAI/gpt-neo-1.3B tokenizer, which converts raw text into numerical token IDs compatible with the model’s vocabulary. To ensure consistent input lengths and efficient training, tokenized sequences were truncated or padded to a fixed maximum length of 512 tokens. Padding was applied using the model’s end-of-sequence token (eos_token), by setting the pad_token_id to match it. This ensured that padding tokens did not negatively affect loss computation.labels field, enabling supervised learning where the model is trained to predict the next token in the sequence given the current context.Trainer with the following hyperparameters:1TrainingArguments(
2 output_dir="./gpt-neo-qa",
3 per_device_train_batch_size=2,
4 gradient_accumulation_steps=2,
5 num_train_epochs=16,
6 learning_rate=5e-5,
7 fp16=True,
8 logging_steps=10,
9 save_steps=2000,
10 save_total_limit=2,
11 report_to="none"
12)fp16=True)doguilmak/inferencevision-gpt-neo-1.3B model. It uses Hugging Face Transformers to load the model and generate answers for InferenceVision-related questions. The model is optimized for domain-specific QA and works best when given clear queries formatted as questions.1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_name = "doguilmak/inferencevision-gpt-neo-1.3B"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(model_name)
7model.eval()
8
9device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10model.to(device)
11
12def ask_question(question, max_new_tokens=50):
13 prompt = f"Q: {question}\nA:"
14 inputs = tokenizer(prompt, return_tensors="pt").to(device)
15
16 with torch.no_grad():
17 outputs = model.generate(
18 **inputs,
19 max_new_tokens=max_new_tokens,
20 temperature=0.7,
21 top_p=0.95,
22 do_sample=True,
23 pad_token_id=tokenizer.eos_token_id
24 )
25
26 answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
27 return answer.replace(prompt, "").strip()
28
29question = "What is InferenceVision?"
30answer = ask_question(question)
31print("Answer:", answer)