UDORN, Thailand (AP) _ Already a major source of illicit heroin, Thailand has become a major source for a premium variety of marijuana for users in the United States, Australia and other countries, according to U.S and Thai investigators.

One early bit of evidence of this came last New Year's Day, when a U.S. Coast Guard cutter, alerted by American and Thai narcotics agents, intercepted the 145-foot vessel Pacific Star heading for the Pacific coast of North America.

The vessel, in an apparent attempt to avoid capture, rammed the cutter but sank. Before it went down, U.S. authorities seized its seven-man crew and salvaged some of the estimated 20 tons of high-grade marijuana grown 5,500 miles away in Thailand.

The Australian Embassy in Thailand says a ''fair percentage'' of marijuana consumed in Australia is smuggled from Thailand. Australian growers, the embassy says, could supply all of the country's demand but the Thai product is superior and much sought after.

A senior U.S. narcotics official, who spoke only on condition of anonymity because of the nature of his assignment, said American criminal elements are involved with Thai crime syndicates and are offering instructions on advanced marijuana growing techniques. He would not identify them any further.

''We have not yet been able to penetrate connections between the Thais and foreign financiers,'' said Gen. Chavalit Yaodmanee, head of Thailand's Office of the Narcotics Control Board.

He added that he suspects actual marijuana transfers are being made from small Thai craft to foreign, ocean-going vessels on the high seas. He said, however, he had no information on any American traffickers in Thailand.

Thailand's heroin supply comes from opium poppies grown in the Golden Triangle, where the borders of Burma, Laos and northern Thailand meet.

The marijuana comes largely from Thailand's northeastern provinces, the poorest region of the country where yearly per capita income is the equivalent of $270.

The Thais have launched a search-and-destroy campaign in the area but Chavalit said in an interview: ''It's like cancer. You start cutting in one area and it spreads to another. And marijuana can be grown almost anywhere in Thailand.''

According to his control board, 200 tons of marijuana were destroyed in 1983 while last year the amount soared to 2,500 tons. Most of it was destroyed by Thai teams that cut it by hand.

Chavalit said plans were being made to use satellite photography to detect the fields. The searches now are made by observation from helicopters.

A major reason cited by Thai officials for the anti-marijuana drive is a concern that the vast profits from the trade would stock ''war chests'' of corrupt politicians and others, as had occured earlier with heroin money in northern Thailand.

Marijuana is not new to Thailand. It is a traditional condiment used in certain curries and has been relatively common at the lower end of the social spectrum.

Extra amounts were grown to cater to American soldiers stationed in Thailand during the Vietnam war years. The soldiers now have been partly replaced by younger foreign tourists who regard smoking potent ''Buddha sticks'' as part of their ''Thai experience.''

The export of marijuana is relatively recent, however.

Maj. Siri Pathumawattananonda of the border patrol police in Udorn said the largest quantity of top grade marijuana used to be grown in Nakhon Phanom Province bordering communist Laos, but that suppression drives there led to a shift to Sakhon Nakhon, also in the northeast.

He added that middle men apparently provide farmers with funds for fertilizer and other needs and then haul the harvested plants by truck along excellent roads to the Gulf of Thailand seaboard where the trafficking vessels are waiting.

According to the Thai investigators, a farmer in the northeast receives about 1,800 baht ($69) for an acre of rice, but more than 10 times that by growing an acre of marijuana.

A trafficker in Bangkok, Thailand's capital, fetches about 900 baht ($34) a pound. The estimated $40 million worth of marijuana seized aboard the Pacific Star was valued in California at $1,000 a pound.

Chavalit said the Thai syndicates appear to view the United States as their major export market.

The U.S. Drug Enforcement Agency, which has a large presence in Thailand, is cooperating closely with Thai authorities. One result of the joint efforts was the Pacific Star case in which four Americans were convicted in the United States and three non-U.S. citizens deported. A related seizure-at-sea case is before the courts in Oregon.

But the bulk of U.S. narcotics assistance still is funneled to fight the heroin traffic from Thailand.