CARACAS, Venezuela (AP) _ The Venezuelan military is gearing up for a major effort against Colombian drug-linked guerrillas in an attempt to halt the spread of drug plantations in this country.

Two National Guard infantry batallions comprising almost 800 men have been sent to the Sierra de Perija region near the border with Colombia, military sources told The Associated Press. The deployment came after nine guardsmen of a 23-man patrol were killed by Colombian guerrillas in an ambush there last Saturday.

The military has also requested that Colombia beef up patrols on its side of the border to combat the guerrillas.

Greater joint efforts are indispensible, the military sources say, because the fields in Venezuela are being planted under supervision of Colombian drug traffickers and protected by Colombian guerrillas.

Venezuelan, Colombian and U.S. officials say factions of several leftist Colombian guerrilla organizations engage in narcotics production or trafficking or work as mercenaries for drug lords to finance their insurrection.

''We've been talking with the Colombian authorities for over two years now about this. We want Colombian troops on the border to stop (the guerrillas) at the border,'' said one ranking military officer, who spoke on condition of anonymity.

Venezuela is already known to be a major transshipment point for cocaine and marijuana, mainly from Colombia, destined for the United States and Europe.

But the new stage of military alert, and national alarm, has arisen as more and bigger coca fields are discovered in the uninhabited parts of the nation close to its 1,200-mile border with Colombia.

The first Venezuelan plantation of coca, the plant from which cocaine is extracted, were found in March 1985 in the Sierra de Perija about four miles from the Colombian border.

Military officials considered the 15 acre field experimental, although by August another 1,800 acres of marijuana with a few coca plants mixed in were discovered in the same region.

Last week's attack occurred as National Guardsmen were clearing a 500 acre plantation of marijuana and coca that they had uncovered two weeks before eight miles from the Colombian border.

''These are Colombian operations, with the Colombians organizing the local peasants (to grow the coca),'' said the ranking military source.

''We must intensify our efforts to free our nation from this (drug) scourge...but we require the collaboration of our neighboring country so that we can act together against something which is a challenge to both our nations' security,'' said Venezuelan President Jaime Lusinchi in a speech Wednesday before military officials.

The remoteness of the border highlands makes it almost impossible even to estimate how much land may already be under drug cultivation, military officials say.

The Sierra de Perija is a range of tropical forest-blanketed mountains 6,000-7,500 feet high and almost perpetually covered by mist and rain. The region is criss-crossed only by narrow footpaths.

The only other access is by helicopter.

The Venezuelans have been negotiating to buy helicopters, possibly from the U.S. or France, for mobilizing troops or spraying herbicides, but no immediate purchase is expected, according to diplomatic sources.

National Guard General Alfredo Sandoval Hernandez swore this week his men would ''fight ceaselessly'' to destroy the fields.

But in a press conference earlier this year he admitted he didn't have the resources to control the flow of drugs through Venezuela, let alone destroy the plantations.