How to Become a Machine Learning Engineer as an International Student: Full Visa Timeline
Your roadmap from F-1 student to full-time ML engineer with H-1B sponsorship — degrees, skills, visa sequencing, and the 2026 lottery reality you need to plan around.

You spent two or three years building skills in PyTorch, transformers, and distributed training systems. You have a thesis defense scheduled or a portfolio of Kaggle wins and open-source contributions. Now you're staring at the US job market and realizing that landing the role is only half the problem — keeping status long enough to build a career here is the other half.
Machine learning engineering sits at the intersection of two realities: it is one of the highest-demand roles in the US labor market, and it draws intense competition from both domestic and international candidates. The good news is that the visa math actually favors you more in this field than almost anywhere else in tech. High wages push your H-1B lottery odds up. STEM OPT eligibility is nearly universal for ML-adjacent degrees. Cap-exempt research positions are abundant at university AI labs. This guide maps the full path — from your current F-1 status through OPT, STEM OPT, and the lottery — so you can plan every step rather than react to each one.
The degree and skills foundation that makes everything easier
Your degree is not just a credential — it directly determines your STEM OPT eligibility, your H-1B specialty-occupation argument, and how long you have to find sponsorship.
Which degrees qualify
The Department of Homeland Security STEM OPT list includes Computer Science, Electrical Engineering, Mathematics, Statistics, Data Science, and Computational Science, among others. If your degree is in one of these, you get 12 months of OPT plus a 24-month STEM extension — 36 months total to run the H-1B lottery. Check the full STEM OPT qualifying majors list for 2026 before assuming your program qualifies; the list is more specific than the field name suggests.
If you are still choosing between a thesis and a non-thesis master's, choose the thesis if you can stomach the timeline. A thesis gives you publishable research, which strengthens an O-1A or EB-2 NIW petition later, and it makes your postdoc options at cap-exempt institutions far more realistic.
Technical skills that drive Level III wages
Under the wage-weighted H-1B lottery, getting your petition classified at the DOL Level III prevailing wage (instead of Level I or Level II) can more than triple your effective lottery odds. Level III corresponds roughly to an experienced practitioner — not a new grad rate. The skills that justify Level III compensation in ML engineering as of 2026:
- Production ML systems experience (not just research notebooks)
- MLOps and model deployment (Kubernetes, model serving, monitoring)
- Large language model fine-tuning, RLHF, or retrieval-augmented generation
- Distributed training at scale (multi-GPU, multi-node)
- Quantitative evaluation and safety testing frameworks
The more of these you can demonstrate through real projects or internship work before your offer, the more likely your employer will write a job description that commands a Level III wage — and the more your lottery ticket is worth.
Your visa timeline as an ML engineer
The sequence below assumes you are a full-time F-1 student completing a US degree. Numbers and rules are as of 2026; always confirm current details with your DSO and a licensed immigration attorney.
Step-by-step visa timeline
- During your program (F-1 D/S status): Use Curricular Practical Training (CPT) for co-ops or research internships if your program offers it. Day-1 CPT carries real risks — understand them before enrolling in a program that offers it.
- Final semester: Apply for OPT at least 90 days before your program end date. USCIS processing for the EAD card can take 3-5 months; apply early or use the OPT EAD auto-extension if your STEM extension is pending.
- Graduation + 12-month OPT: You are authorized to work as an ML engineer in your field. Track the 90-day unemployment clock carefully — cumulative gaps cannot exceed 90 days total during the 12-month period. See strategies for managing the OPT 90-day unemployment clock.
- Apply for STEM OPT extension: File Form I-765 with your employer's signed I-983 Training Plan at least 90 days before your 12-month OPT expires. Your employer must be enrolled in E-Verify. Once approved, you have 24 more months — 36 total.
- H-1B lottery registration (each March for October 1 start): Your employer registers you in the lottery. Under the wage-weighted system, the wage level on your LCA determines how many entries you receive. Level III gets approximately 3x entries compared to Level I. See ML engineer H-1B sponsorship for a deeper look at lottery strategy.
- If selected: Your employer files the full I-129 petition between April and June. You start H-1B on October 1 (or cap-gap extends your OPT if you're in that window).
- If not selected: Remain on STEM OPT, continue working, and re-enter the next lottery. With 36 months of authorized work time, you get up to three lottery chances.
Visa timeline summary table
| Phase | Status | Authorized Work Duration | Notes |
|---|---|---|---|
| Enrolled full-time | F-1 D/S | No off-campus work (except CPT) | Internships via CPT only |
| Post-graduation | OPT | 12 months | 90-day unemployment limit |
| STEM OPT extension | OPT STEM | 24 additional months | I-983 required; quarterly employer attestations emerging |
| H-1B (if selected) | H-1B | 3 years initial, renewable | LCA wage level drives lottery odds |
| H-1B extension | H-1B | 3-year increments | Green card process can run in parallel |
The H-1B lottery reality for ML engineers in 2026
For FY2027, the H-1B cap was reached using the wage-weighted selection system for the first time. This fundamentally changes how you should approach the lottery. Under the wage-weighted system:
- Level III entries get approximately 3 times more selection weight than Level I entries, with a selection rate around 45.9% versus roughly 15.3% for Level I.
- Level IV entries receive similar weighting to Level III (the system has two tiers: below-Level-IV and Level-IV-and-above groupings; confirm current DOL/USCIS guidance with your attorney).
The practical implication is that negotiating your ML engineer offer to a Level III prevailing wage before the March lottery registration window is one of the most impactful things you can do. The DOL proposed a 21%–33% prevailing wage increase in March 2026 (proposed, not yet final — verify with your attorney before your offer negotiation); if finalized, this may shift which offers clear Level III.
Additionally, reports are emerging that STEM OPT quarterly employer attestations with real-time wage verification may become a formal requirement. This is not yet final rule — confirm the current status with your DSO before your next STEM OPT reporting cycle.
For a complete breakdown of lottery mechanics and strategies, read our guide on cap-exempt employer strategies under the weighted lottery.
Cap-exempt employers as a career path and a bridge
One of the most underused strategies for international ML engineers is the cap-exempt employment path. Universities, nonprofit research organizations (such as the Allen Institute or some national labs operating under university contracts), and government research institutions can file H-1B petitions at any time of year without the lottery.
How it works as a bridge: If you exhaust STEM OPT without winning the lottery, or if you want to build your research profile while the lottery runs, a research scientist or research engineer role at a university AI lab can get you into H-1B status without competing in the lottery at all. You then pursue a cap-subject petition from that position — either through an employer who agrees to concurrently file a cap-subject petition, or by transferring after you win the lottery in a subsequent year.
How it works as a career: Many of the most influential ML engineering roles in the US are at university labs and nonprofit research organizations — think academic AI groups at major R1 universities, or government-affiliated research centers. These roles come with publication rights, access to large compute clusters, and career capital that translates well to industry.
The trade-off is compensation. Industry Level III ML engineering roles in major metros pay substantially more than most cap-exempt positions. The cap-exempt path is a bridge or a calling, not necessarily a permanent career track for everyone.
Green card pathways from ML engineering
Starting your green card process as early as possible is standard advice, but it matters more in practice than most candidates realize. The three most common paths for ML engineers:
EB-2 with PERM labor certification: Your employer files a PERM application with DOL, then an I-140 petition with USCIS. For workers from India and China, the EB-2 priority date queue is extremely long — measured in years or decades at current rates. Start as early as your employer will allow, even during your H-1B petition, to accumulate the earliest possible priority date.
EB-2 National Interest Waiver (self-petition): If your ML research addresses a national interest — AI safety, healthcare AI, climate modeling, national security applications — you may qualify to self-petition without employer sponsorship or a PERM. You still need to demonstrate substantial merit and a national interest benefit. This path is worth exploring if you have peer-reviewed publications, significant open-source contributions, or documented impact. Read more in our EB-2 NIW self-petition guide.
EB-1A Extraordinary Ability: For ML engineers with major awards, significant citation records, or documented major contributions to the field, EB-1A bypasses both PERM and the priority date queue. It is a high bar, but the field produces extraordinary contributors at an earlier career stage than most disciplines. If you have an NeurIPS, ICML, or ICLR best paper, take EB-1A seriously.
Where to find ML engineering roles that sponsor
The sponsorship landscape for ML engineers is broad — far broader than most candidates assume. Large tech companies sponsor at scale and are well-understood. Less obvious but equally important categories:
- AI research labs at major tech companies: These operate like cap-exempt academic environments inside cap-subject companies. They tend to pay Level III or Level IV wages by default and have experienced immigration teams.
- Fintech and quantitative trading firms: Heavy ML users, strong sponsorship track records, and wages that clear Level III comfortably.
- Healthcare AI and medical devices: Slower hiring cycles but strong demand for ML engineers; many are willing to sponsor because the candidate pool is smaller.
- Defense and aerospace tech: Watch for International Traffic in Arms Regulations (ITAR) requirements — some roles require US citizenship or permanent residence. Clarify early whether a role is ITAR-restricted.
- Enterprise SaaS: Growing ML engineering teams as companies embed AI features; often willing to sponsor because they have existing immigration infrastructure.
Use the DOL's LCA (Labor Condition Application) database and USCIS's employer data hub to verify that a company has filed LCAs for ML engineer roles in recent years before investing heavily in an application.
Common mistakes
Not tracking the 90-day unemployment clock from day one. The clock runs cumulatively and does not reset. Many candidates assume it resets with each employer; it does not. See USCIS guidance on authorized periods of unemployment during OPT.
Accepting a Level I wage offer without pushing back. Under the wage-weighted lottery, this is no longer just a compensation decision — it directly cuts your selection odds by two-thirds. A Level I offer is worth negotiating hard on, not just accepting because you need the sponsor.
Assuming your STEM degree automatically qualifies for STEM OPT. The DHS STEM OPT list uses Classification of Instructional Programs (CIP) codes tied to your specific program, not the general field name. Your DSO has to confirm the code; do not assume.
Skipping the I-983 Training Plan details. STEM OPT requires a genuine training plan with learning objectives tied to your degree. If quarterly attestation requirements are formalized (emerging rule — confirm with your DSO), incomplete or boilerplate plans will be flagged. Build a real plan with your employer at the start of your STEM OPT period.
Treating cap-exempt employment as a last resort. Many candidates only consider university or nonprofit roles after failing the lottery. If you approach cap-exempt employers proactively, you gain H-1B status without lottery exposure at all, build your research record, and are better positioned for EB-2 NIW or EB-1A later.
Letting your STEM OPT expire without a transition plan. The 30-day grace period after STEM OPT ends is short and does not authorize work. Have your next status move in motion — H-1B cap-gap, cap-exempt H-1B filing, or departure — well before expiration.
Ignoring the ML-to-MLOps gap on your resume. Many ML engineers from academic backgrounds present only research projects. Employers filing at Level III need to justify that wage with a production-oriented job description. If your resume reads like a research CV, employers may classify the role at Level II, reducing your lottery odds and potentially creating an RFE risk.
Frequently asked questions
Does a machine learning engineer role qualify for H-1B specialty occupation?
Yes — ML engineer roles consistently qualify as H-1B specialty occupations because they require at minimum a bachelor's degree in computer science, statistics, or a directly related field. USCIS evaluates the actual duties and the degree requirement the employer enforces, so make sure your offer letter lists a specific degree requirement rather than just "equivalent experience." If your undergraduate degree is in a non-CS field, a US master's in CS or data science strengthens the petition substantially.
What is the best degree path for an international student targeting ML engineering?
A US master's in Computer Science, Data Science, or Electrical Engineering (all STEM OPT eligible) gives you the 24-month STEM OPT extension on top of 12-month OPT, three total lottery attempts across those 36 months, and a credential that clearly satisfies specialty-occupation requirements. A research-focused thesis also opens cap-exempt postdoc or national-lab positions as a fallback if the lottery misses.
How does the wage-weighted H-1B lottery affect ML engineers specifically?
ML engineers tend to attract Level III or Level IV prevailing wages in major tech metros, which directly improves your lottery odds under the wage-weighted system that took full effect for FY2027. Under that system a Level III petition receives roughly 3x the entries of a Level I petition — a selection rate around 45.9% versus roughly 15.3% for Level I. Negotiating your offer to a Level III wage before lottery registration is one of the highest-leverage moves you can make.
Can I work at a university AI lab to avoid the H-1B lottery entirely?
Yes — universities, nonprofit research organizations, and government research labs are cap-exempt H-1B employers. You can receive an H-1B from a cap-exempt employer at any time without going through the lottery, and you keep that status while pursuing a cap-subject position later. Many ML engineers use a postdoc, research scientist, or research engineer role at a university lab as a bridge between STEM OPT and a cap-subject industry job.
What happens if I miss the H-1B lottery while on STEM OPT?
You can remain on STEM OPT for the remainder of your authorized period (up to 24 months of extension) and re-enter the next lottery cycle. If you exhaust STEM OPT without a cap-subject H-1B, your options include a cap-exempt employer bridge, an O-1A petition if your research record is strong, a second master's degree to restart OPT, or returning home and continuing to apply remotely for the following year's lottery.
The ML engineering path as an international student is genuinely one of the better visa journeys available in the US tech market right now — high demand, strong wages that favor you in the lottery, abundant STEM OPT eligibility, and a research ecosystem full of cap-exempt options. The candidates who struggle are usually the ones who treat each phase reactively. The ones who succeed map the full timeline from day one and make deliberate decisions at each inflection point.
If you want a team to help you build that plan — targeting the right employers, structuring your application for Level III wages, and navigating the OPT-to-H-1B sequence — F1Jobs works through exactly this process with ML engineers every month.
Frequently asked questions
Does a machine learning engineer role qualify for H-1B specialty occupation?
Yes — ML engineer roles consistently qualify as H-1B specialty occupations because they require at minimum a bachelor's degree in computer science, statistics, or a directly related field. USCIS evaluates the actual duties and the degree requirement the employer enforces, so make sure your offer letter lists a specific degree requirement rather than just "equivalent experience." If your undergraduate degree is in a non-CS field, a US master's in CS or data science strengthens the petition substantially.
What is the best degree path for an international student targeting ML engineering?
A US master's in Computer Science, Data Science, or Electrical Engineering (all STEM OPT eligible) gives you the 24-month STEM OPT extension on top of 12-month OPT, three total lottery attempts across those 36 months, and a credential that clearly satisfies specialty-occupation requirements. A research-focused thesis also opens cap-exempt postdoc or national-lab positions as a fallback if the lottery misses.
How does the wage-weighted H-1B lottery affect ML engineers specifically?
ML engineers tend to attract Level III or Level IV prevailing wages in major tech metros, which directly improves your lottery odds under the wage-weighted system that took full effect for FY2027. Under that system a Level III petition receives roughly 3x the entries of a Level I petition — a selection rate around 45.9% versus roughly 15.3% for Level I. Negotiating your offer to a Level III wage before lottery registration is one of the highest-leverage moves you can make.
Can I work at a university AI lab to avoid the H-1B lottery entirely?
Yes — universities, nonprofit research organizations, and government research labs are cap-exempt H-1B employers. You can receive an H-1B from a cap-exempt employer at any time without going through the lottery, and you keep that status while pursuing a cap-subject position later. Many ML engineers use a postdoc, research scientist, or research engineer role at a university lab as a bridge between STEM OPT and a cap-subject industry job.
What happens if I miss the H-1B lottery while on STEM OPT?
You can remain on STEM OPT for the remainder of your authorized period (up to 24 months of extension) and re-enter the next lottery cycle. If you exhaust STEM OPT without a cap-subject H-1B, your options include a cap-exempt employer bridge, an O-1A petition if your research record is strong, a second master's degree to restart OPT, or returning home and continuing to apply remotely for the following year's lottery.