Skip to content

Instantly share code, notes, and snippets.

@mbant
mbant / beam_search.cpp
Last active January 14, 2024 13:41
Beam Search - C++
#include<array>
#include<chrono>
#include<algorithm>
#include<cmath>
#include<iostream>
#include<vector>
using namespace std;
constexpr array<char,26> vocab = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
vector<vector<double>> log_p_language_model;