Amazon interview question

Machine Learning and AI Questions: What is Gradient Descent?Gradient Descent is an optimization algorithm used to minimize the cost function by iteratively adjusting the model’s parameters in the direction of the steepest descent of the gradient. Name Some Python Libraries for Machine Learning/AI: Libraries: TensorFlow, PyTorch, scikit-learn, Keras, Pandas, NumPy, Matplotlib. Name Some Machine Learning Models:Linear Regression, Logistic Regression, Decision Trees, Random Forest, Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Transformer Models. What is a Transformer?A transformer is a deep learning model architecture designed to handle sequential data, most often used in NLP tasks like translation or text generation. What is Attention in Transformers?Attention mechanisms allow models to focus on specific parts of the input sequence, which helps transformers process and understand relationships between words or tokens more efficiently. What is Distributed Training?Distributed training involves training machine learning models across multiple machines (or nodes) to handle large-scale data and computationally intensive tasks. What is Model Parallelism?Model parallelism splits a large machine learning model across multiple GPUs or machines to reduce memory constraints during training. What is Data Parallelism?Data parallelism involves distributing the data across different processing units and performing computations on different portions of data simultaneously, but the model stays the same across all units. Difference Between Parallel and Distributed Computing:Parallel computing executes multiple tasks simultaneously on the same machine. Distributed computing involves running computations across multiple machines or nodes. What is LangChain? Likely refers to LangChain, a framework used to develop applications that integrate with language models. It provides abstractions and tools for managing inputs, outputs, and workflows in LLM applications. How Do You Train an Image Model with Limited Compute/Storage? Solution: Use techniques like model pruning, model quantization, or transfer learning. You can also use cloud services with large compute instances or leverage distributed training on multiple GPUs. What is a GPU and When Do We Use It?A GPU (Graphics Processing Unit) is optimized for parallel processing, and it’s used in machine learning tasks like training deep neural networks for faster computations. Difference Between CPU and GPU?CPU: General-purpose processor optimized for sequential tasks.GPU: Specialized for parallel tasks, like matrix multiplication, making it ideal for ML tasks. How Does a Neural Network Work?A neural network is a system of interconnected layers of nodes (neurons) where each node processes inputs and applies weights and biases before passing output to the next layer. It "learns" by adjusting these weights using backpropagation during training. What is Autoregression in Text Mining?Autoregression models predict the next word or value in a sequence based on previous data points, commonly used in time series and NLP tasks. Cloud and Security Questions: What is Security and Layers of Security?Security in the cloud involves multiple layers, including network security, application security, identity management, and data protection (e.g., encryption). How to Move Data Safely Between Storages?Use encrypted transfer protocols like HTTPS or SFTP. AWS services such as S3 Transfer Acceleration or AWS DataSync can help. What Databases Have You Worked With?Examples could include Amazon RDS, DynamoDB, MongoDB, PostgreSQL, MySQL, Redshift. What is a Data Lake?A data lake is a centralized repository that stores large amounts of raw, structured, or unstructured data, which can be processed and analyzed later. Three-Layer Architecture?Presentation Layer, Application Layer, and Data Layer, used to separate concerns and scale applications more easily. Migration 7R’s?Retire, Retain, Rehost, Replatform, Refactor, Repurchase, Rebuild—strategies for migrating applications to the cloud. How to Check Security and Access Levels?Use IAM (Identity and Access Management) policies and roles, conduct regular audits, and use services like AWS CloudTrail for logging access and activities. How to Ensure Data Availability/Reliability?Use multi-region or multi-AZ deployments, implement auto-scaling, perform backups, and monitor health with services like CloudWatch. What is Cloud Compute?Cloud compute refers to virtual servers and services (e.g., EC2, AWS Lambda) that provide scalable compute power without managing physical infrastructure. Pros and Cons of Serverless Computing?Pros: No infrastructure management, automatic scaling, cost-efficient. Cons: Limited control, cold-start issues, less flexibility for complex workloads. Example of Serverless Computing:AWS Lambda functions triggered by S3 uploads, API Gateway requests, etc. How Docker Works? How Kubernetes Works? What is SSL?